samba service (anonymous shared)

1. Use the command yum install samba server

yum -y install samba-*

2. Add the following in the global configuration

[global]
map to guest = Bad User

3. Create a shared directory to 777

mkdir / BaO
chmod 777 / BaO

4. Modify profile smb.conf

[xin] (share name)
path = / BaO (to be shared directory)
browseable = yes (visit)
public = yes (to allow anonymous users to access)
the Guest the ok = yes (accessible to everyone)
Writable = yes (shared directory available write)

The server starts smb, turn off the firewall. Setting setenforce 0

systemctl start smb nmb
systemctl stop firewalld
setenforce 0

Client:
6. Client Installation samba-client, turn off the firewall. Setting setenforce 0

yun -y install samba-client
systemctl stop firewalld
setenforce 0

7. Mount

mount -t cifs //192.168.230.130/xin /lpl -o username='Bad User'

8. Enter the shared directory on the client to create a new file

mkdir 666

Guess you like

Origin blog.51cto.com/14279260/2416841