题目
yum install samba -y
vim /etc/samba/smb.conf
groupadd administration
groupadd sales
groupadd manager
useradd -g administration tom
useradd -g administration jerry
usermod -G sales jerry
useradd -g sales jack
useradd -g manager man
echo "tom" | passwd --stdin tom
echo "jerry" | passwd --stdin jerry
echo "jack" | passwd --stdin jack
echo "man" | passwd --stdin man
mkdir /var/{administration,sales,public}_share
chmod 777 /var/{administration,sales,public}_share
vim /etc/samba/smb.conf
[administration_share]
path = /var/administration_share
valid users = @administration,@sales,@manager
write list = @administration,@manager
read list = @sales
writeable = yes
[sales_share]
path = /var/sales_share
valid users = @sales,@manager
write list = @sales,@manager
read list = @sales,@manager
writeable = yes
[public]
comment = puvlic
path =/var/public_share/
browseable = yes
public = yes
client lanman auth= yes
lanman auth = yes
client ntlmv2 auth = no
[root@www ~]# smbpasswd -a tom
New SMB password:
Retype new SMB password:
Added user tom.
[root@www ~]# smbpasswd -a jerry
New SMB password:
Retype new SMB password:
Added user jerry.
[root@www ~]# smbpasswd -a jack
New SMB password:
Retype new SMB password:
Added user jack.
[root@www ~]# smbpasswd -a man
New SMB password:
Retype new SMB password:
Added user man.
smbclient //192.168.10.21/
服务器租用托管,机房租用托管,主机租用托管,https://www.e1idc.com