CentOS – Samba Share – Write Only (PART 21)

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


Change the block:


comment = Exchange information for teachers

path = /data/teachers

public = no

valid users = +teachers

writable = yes


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/


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


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.