1. Client command:
List public SMB shares with
smbclient -L //server -U username
Connect to a SMB share with
smbclient //server/share -U username
2. Check configure file:
testparm
3. Create an account
addgroup smbgrp
useradd till -G smbgrp
smbpasswd -a till
4. Making a public folder for everybody,
everybody can own the folder.
[Public]
path = /samba/public
create mask = 0700
read only = no
mkdir /samba/public
chmod -R 7777 ./public/
chown :smbgrp ./public/ -R
5. Making a team folder for sale department
leader account can write and read the folder, staff only can read the folder.
addgroup salegroup
useradd -g salegroup staff
smbpasswd -a staff
useradd -G salegroup leader
smbpasswd -a leader
mkdir -p /samba/saleteam
chown -R leader:salegroup ./saleteam
chmod -R 750 saleteam
vim /etc/samba/smb.conf
[Sales team]
path = /samba/secured
guest ok = no
writable = yes
browsable = yes
save and quit;
service smbd restart
阅读(1175) | 评论(0) | 转发(0) |