In the past, I always liked to use virtual machine tools provided by virtual machines to share files between Linux and Windows. However, Linux has been used frequently recently, and you often need to copy some files and programs to/mnt/HGFS/Shar directory, it is a little troublesome. So we built the Samba server on the working fedora15. The detailed procedure for recording is as follows:
Condition: the VM can access the Internet.
1. Execute # Yum install samba * on the terminal, which makes it easy to automatically update the supported software and libraries. You can also find the samba RPM package in the image file where fedora is installed and execute the rpm-IVH Samba *** (Version) installation.
2. After executing the preceding command, Samba will be automatically installed in the system. Now you only need to configure the Samba server and modify/etc/samba/smb. conf.
# Vi/etc/samba/smb. conf
① Modify globals setting (about 85 rows)
Workgroup = workgroup
Server String = % u's Samba server version % V (set the content by yourself)
NetBIOS name = Fedora
Username MPa =/etc/samba/smbusers
② Modify logging options
Log File =/usr/log/samba/log. %
Max log size = 50
③ Modify standand server options
Security = user
Passdb backend = tdbsam
④ Configure shared definitions
[Fedora-Samba]
Comment = Samba specify the display name
Path =/Specify the shared directory (set with caution)
Writable = Yes permission
Write list = Login User Name
Host allow = 192.168. IP restrictions
⑤ Save and exit. Run # testparm in the/etc/samba/directory to test the correctness of the configuration file. You can proceed to the next step.
4. Add Samba users
# Useradd external user
# Smbpasswd-a temporary user
(Enter the password ).....
5. Disable the firewall, # service iptables stop
6. Set Automatic startup of SMB and nmb
# Chkconfig SMB on
# Chkconfig nmb on
7. The SELinux service is enabled in Linux, so disable the service:
# Vi/etc/SELinux/config
Modify: SELinux = Disable;
The restart takes effect;
If you do not want to disable SELinux, you can set some services as follows:
# Setsebool-P samba_enable_home_dirs on
# Setsebool-P samba_export_all_ro on
# Setsebool-P samba_exprot_all_rw on
8. Start the Samba server
# Service SMB restart
# Service nmb restart
In Windows, enter the Linux IP address and the user name and password to access the linux root directory.
For configuration, refer to the notes of several netizens.