Configure the RedHat IP address to ensure that the RedHat can ping the xp ip address.
The RedHat IP address is best configured in static mode, so that its IP address will not change frequently. The IP Address Settings refer to the IP address of the local system.
The IP address of my host is:
IP address ......: 192.168.5.159
Subnet Mask ......: 255.255.255.0
Default Gateway ......: 192.168.5.254
Set the static IP address of RedHat in VM:
IP address ......: 192.168.5.160
Subnet Mask ......: 255.255.255.0
Default Gateway ......: 192.168.5.254
1. Modify the samba configuration file.
Command: # vi/etc/samba/smb. conf
Add the followingCode:
[Root]
Comment = root directories
Browseable = Yes
Writable = Yes
Path =/
Valid users = SMB
2. Add a user. Note that the added user is the same as the valid users = SMB part of the configuration file. If the SMB User exists, you do not need to add it.
Command: # useradd SMB
3. Set the password for logging on to the Samba server with the SMB account
Command: # smbpasswd-a SMB
4. Restart the Samba server.
Command: #/etc/init. d/SMB restart
5. log on to the Samba server in Windows when the windows and unux networks are smooth.
If my Linux IP address is 192.168.5.160, enter \\192.168.5.160
A logon interface is displayed. Enter the account name SMB and the password for logging on to the Samba server.
Now files between Windows and Linux can be shared through the folder SMB!