Windows does not allow multiple user authentications to a single host.Īlternatively, to share a directory with a group of users, you can use group sharing. Note that on Windows, you will not be able to access multiple home directories from a single Windows system. To enable write permissions, add the following line to the preceding block: Home directories are by default shared as read only. You will be required to provide a username and password to access these shares. Add the following lines to the Samba configuration to enable the sharing of home directories:Īfter this configuration, user's home directories will be available at //server-name/user-name. This will enable users to create shares for all existing Ubuntu users with a single block of configuration. Samba also supports the sharing of users, home directories. Similarly, you can limit write permissions to a set of users, as follows: Valid users = userone, usertwo, userthree To enable multiple users to access a shared resource, you can specify the list of users under the valid users line, as follows: You can enable or disable Samba users with the following commands: Samba maintains a database of passwords separately from Ubuntu passwords. You can also use existing user accounts on the Ubuntu server.Īfter adding a user, we set a password to be used with the Samba server. This will allow smbuser to access only the Samba shared directory and nothing else. We have created a new user with the nologin permission. In the previous recipe, we learned how to set up a public share, and in this recipe we have created a private share for a single user. Samba allows various different types of configuration for shared resources. On trying to open that directory, you will be asked for a Samba username and password: Save the changes to the configuration file and reload the Samba server: Next, edit the Samba configuration to add the preceding share: $ sudo chown smbuser:smbuser /var/samba/share/smbuser First, enter your sudo password, followed by the new password for your Samba account, and then verify the password:Ĭreate a shared directory for this user and change its ownership: Now, we need to allocate a Samba password to this new user. $ sudo useradd -d /home/smbuser -s /sbin/nologin smbuser You can use any existing account or add a new Samba only account with the following command. Make sure that the Samba server is installed and running.įollow these steps to add users to the Samba server:Ĭreate a new user account. You will need access to a root account or an account with sudo privileges. In this recipe, we will learn how to add authentication to the Samba server and password protect shared directories. In the previous recipe, we installed the Samba server and created a public share accessible to everyone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |