LAB 21: Samba Share – Write Only
Now we will share the Teachers folder.
Only Teachers are allowed and they have full access.
vi /etc/samba/smb.conf
:set nu
:296,301t301
Change the block:
[teachers]
comment = Exchange information for teachers
path = /data/teachers
public = no
valid users = +teachers
writable = yes
:x
service smb restart
On DC2012
net use * /del /y
log in as teachers.
Now permission issues
chgrp teachers /data/teachers
chmod 775 –R /data/teachers/
ll
Now you can create sub folder called Physics Homeworks under teachers folder (on DC2012).
net use m: \\DNSSRV\teachers
net use
net use S: \\DNSSRV\software
net use
You can also browse for shares using My Network Places on a Windows box.
On a third Linux machine
ifconfig eth0
Make sure you are connected to LAN
smbtree
You will see \\DNSSRV and all the shares.
mount –t cifs –o username=teacher1 –L //DNSSRV/teachers /mnt
ll /mnt
you will see the subfolder created earlier.