SMB: Provide Network Shares Suitable for Group Collaboration Flashcards

1
Q

Provide Network Shares Suitable for Group Collaboration

A

SMB Server:

adduser user5
adduser user6
passwd user5
passwd user6
groupadd -g 8765 smbgroup
usermod -G smbgroup  user5
usermod -G smbgroup user6
mkdir /smbgroup
chgrp smbgroup /smbgroup
chmod 0770 /smbgroup
getsebool -a | grep samba_export
semanage fcontext -a -t samba_share_t "/smbgroup(/.*)?"
restorecon -Rv /smbgroup
vim /etc/samba/smb.conf
[smbgroup]
  comment = /smbgroup
  browsable = yes
  path = /smbgroup
  public = no
  valid user = @smbgrp
  write list =  @smbgrp
  writable = yes
  force group = +smbgroup
  create mask = 0770

testparm
smbpasswd -a user5
smbpasswd -a user6

systemctl restart smb

On Client:
useradd user5 
useradd user6
passwd user5 
passwd user6
groupadd -g 8765 smbgrp
usermod -G smgrp user5
usermod -G smgrp user6

smbclient -L //ip -U user5
mkdir /smbgroup
mount -o username=user5 //ip/smgroup /smbgroup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly