Sistema de compartilhamento linux
sudo adduser --no-create-hom --shell /usr/sbin/nologin user1
ou
sudo useradd -M -S /sbin/nologin user1
sudo smbpasswd -a user1
sudo smbpasswd -e user1
sudo groupadd Group1
sudo usermod -G group1,group2,group3 user1
(opção -G sobrescreve grupos anteriores)
sudo usermod -aG group1 user1
(opção -aG adiciona sem sobrescrever)
sudo smbcontrol all reload-config
sudo systemctl enable smbd.service
sudo systemctl restart smbd nmbd
smbclient -U user1 //SERVER/projetos
pdbedit -L
smbstatus -L
smbstatus -L | grep "filename"
Obs: utilizar grep com * não faz ele filtrar
workgroup = WORKGROUP recycle:repository = /samba/hd8tb/lixeira/%U recycle:keeptree = yes recycle:exclude = *.tmp, *.log, *.obj,*.bak, *.iso recycle:versions = yes allow insecure wide links = yes
[Porto Paratudal] force group = engenharia follow symlink = yes wide links = yes inherit permissions = yes path = "/samba/hd8tb2/Porto Paratudal" valid users = @engenharia writeable = yes force create mode = 0775 vfs objects = recycle recycle:repository = /samba/hd8tb2/trash/%U recycle:keeptree = yes browseable = yes
[PUBLIC] write list = @itti force group = itti inherit permissions = yes path = /samba/hd8tb/public valid users = @itti vfs objects = recycle
[LIXEIRA] path = /samba/hd8tb/lixeira/ writable = yes force create mode = 0775