Ubuntu Adding Samba Users and Groups

I will be adding users to both my Ubuntu Server, then create their samba user counterpart.

First we need to add a group for our users to join.
sudo groupadd smbusers

Then we need to use the useradd command to add new users to the group we just created (or any existing group); and add the user to the system. The syntax is "useradd -G {group-name} username"
sudo useradd -G smbusers username
sudo passwd username (optional)
sudo smbpasswd -a username

If you already have a user that is created and want to add them to a group, you can do this.
sudo usermod -a -G smbusers username

References:
http://www.cyberciti.biz/faq/adding-a-user-to-a-samba-smb-share/
http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/

No comments:

Post a Comment