[Work and study notes] -- configure the Samba server on fedora15

Source: Internet
Author: User

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.

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.