Controlling Access to Shares
Often you will need to restrict the users who can access a specific share for security reasons. This is very easy to do with Samba since it contains a wealth of options for creating practically any security configuration. Let’s introduce a few configurations that you might want to use in your own Samba setup.
Warning
Again, if you are connecting with Windows 98 or NT 4.0 with Service Pack 3 (or above), those clients will send encrypted passwords to the Samba server. If Samba is not configured for this, it will continually refuse the connection. This chapter describes how to set up Samba for encrypted passwords. See Section 6.4.
We’ve seen what happens when you specify valid users. However, you are also allowed to specify a list of invalid users—users who should never be allowed access to Samba or its shares. This is done with the invalid
users option. We hinted at one frequent use of this option earlier: a global default with the [homes] section to ensure that various system users and superusers cannot be forged for access. For example:
[global]
invalid users = root bin daemon adm sync shutdown \
halt mail news uucp operator gopher
auto services = dave peter bob
[homes]
browsable = no
writeable = yesThe invalid
users option, like valid
users, can take group names as well as usernames. In the event that a user or group appears in both lists, the invalid
users option takes precedence and the user or group will be denied access to the share.
At the other end ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access