8.samba Server and Client configuration

Source: Internet
Author: User

Server Side

1. Install Samba:yum install-y samba\*

Increased Samba users: useradd SMB user name smbpasswd-a SMB user name

2. configuration file: vim/etc/samba/smb.com

Workgroup = workgroup Name
Server String = version

[Share name]

Path= Shared paths

Browritable = yes/no can be browsed

Valid users = user name to read shared content

[Share name]

Path= shared Directory

Browritable = yes/no can be browsed

Valid users = user name to read shared content

writable = no

Write list = Writable user

3. Set selinux:chcon-t samba_share_t shared directory

Setsebool-p Samba_enable_home_dirs on

4. Set the user access settings for this domain to only allow example.com (192.168.1.0/24) firewall:

Firewall-cmd--permanent--add-rich-rule ' rule family=ipv4 source address=192.168.1.0/24 service Name=samba Accept '

Firewall-cmd--permanent--add-rich-rule ' rule family=ipv4 source address=192.168.1.0/24 service Name=samba-client Accept

Firewall-cmd--reload

5. Set up the service:

systemctl restart smb systemctl enable samba Client Side 1. Install package: Yum install-y cifs-utils\* 2. Test mount: mount-t cifs-o Multiuser,username=samba user name, Password=samba user password, SEC=NTLMSSP//samba-server address/mount Directory/mount point 3. View other users of home/home: Su-other users 4. Temporarily switch to samba-server end User: cifscreds add-u samba-server User 5. Clear password: cifscreds clearall 6. Write/etc/fstab://samba-server address/mnt/mount point cifs defaults,multiuser,username=samba-server User, Password=samba-s erver user password, SEC=NTLMSSP 0 0 7. Test Fstab:mount-a

8.samba Server and Client configuration

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.