This article summarizes the methods for Windows XP and Windows 7 to access the shared files in the linxu virtual machine. The system installed on the host is Windows 7, and the Linux version installed on the virtual machine is fedora (32-bit) and Ubuntu 8.04
[Part 1: Configure Samba in fedora for file sharing]
In the virtual machine Linux fedora, execute the following command or action:
1. Install the samba Service
Run the rpm-Qi Samba command to check whether the samba service is installed. If not, you can use Yum install samba for online installation (in the fedora 11 environment ).
2. Start the samba service.
Service SMB start
To enable the samba service automatically, run the ntsysv command (or the system service option in the setup command) and check SMB, after confirming, you can load the samba service at startup.
3. Configure the samba Service
For details about how to configure the samba service, see "configure the samba service and NFS service in Linux".
4. Restart the samba service.
Service SMB restart
5. Disable the Firewall
Service iptables stop
By default, the firewall disables the 139 TCP port and the 137,138 port required by the nmbd process. Therefore, we use the Command Service iptables stop to disable the firewall. You can also modify the firewall to allow port tcp139 and UDP 137,138.
6. Host and Virtual Machine Ping
If the ping fails, you also need to configure the Host IP address and Virtual Machine IP address in one CIDR block. After mutual Ping, We can log on to the shared files in the virtual machine operating system on the host.
[Part 2: Configure Samba in Ubuntu 8.04 for file sharing]
1. Installation of Samba:
Sudo apt-Get Insall sambasudo apt-Get install smbfs
2. Create a shared directory:
Mkdir/home/iPhone/share soduchmod 777/home/iPhone/share
3. Create a samba configuration file:
1. Save the existing configuration file
Sudo CP/etc/samba/smb. conf/etc/samba/smb. conf. Bak
2. modify the current configuration file
Sudo gedit/etc/samba/smb. conf
Add at the end of smb. conf
[Share] Path =/home/iPhone/share available = Yes browsealbe = Yes Public = Yes writable = Yes
4. Create a samba account
Sudo touch/etc/samba/smbpasswd sudo smbpasswd-A phinecos
Then you will be asked to enter the password of the samba account
[If Step 4 is absent, the system prompts Session Setup failed: nt_status_logon_failure when you log on.]
5. Restart the Samba server
Sudo/etc/init. d/samba restart
6. Test
Smbclient-l // localhost/share
7. Use
You can enter the IP address used in windows, and enter "\" + "ubuntu machine IP address or host name" + "\" + "share" in the folder"