CentOS – Hidden Shares (PART 23)

LAB 23: Samba Share – Hidden Share

Login as t1 you will see the folder teacher

You want to hide this

vi /etc/samba/smbd.conf

Change this block

[teachers]

comment = Exchange information for teachers

path = /data/teachers

public = no

valid users = +teachers

writable = yes

browseable = no

 

:x

 

service smb restart

 

On DC2012, access \\DNSSRV as st1, you will not be able to see the teacher share.

As a teacher, you need to enter \\DNSSRV\teachers to access it.

 

Similarly, I want t1 to have full access to update software folder.

Software: Everyone Read, t1 Full

vi /etc/samba/smbd.conf

[software]

comment: Software for us to use

path = /data/software

public = yes    (everyone can read)

; writable =yes (erase this line)

read only = yes    (add this line)

write list = t1

 

:x

 

service smb restart

ll

chown t1 /data/software/

chmod 775 –R /data/software => so that t1 can modify/rename existing directories)

 

On DC2012

Clear cache entry:

net use * /del /y

Access \\DNSSRV as t1

Open Software and create a few sub-directories for testing.

Log back in as t2 and do the same as above, you will see that t2 receives an access denied message when attempting to write to the folder.