Disable Guest Access – Samba

By | 2011/02/22

Samba by nature has guest access for various purposes. However, you can disable guest access to prevent anonymous browsing and tighten security overall.

1. Edit the smb.conf file:

$ sudo nano /etc/samba/smb.conf

Add this line to the [global] section:

restrict anonymous = 2

2. Close and save the file. Then restart samba.

This will restart samba on Ubuntu:

sudo service smbd restart

or on Centos:

# /etc/init.d/smb restart

Done!

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.