Jared_S
Posts: 19
Joined: Sat Apr 12, 2014 1:50 am
Location: US

Add user group?

Sat Apr 12, 2014 1:58 am

Hi. I have a Samba file server set up. I have a shared drive for all the computers. I then have a folder as a separate file share via Samba and I want to have a different username and password. I can change the usergroups in samba from @users to whatever but I need to know how to create a new user group.

Example:

pi@Server-1: sudo useradd Jared -m -G users

I want the user Jared to be added to a user group called server
How can I do that?

[media] comment = Media share
path = /media/HDD01/shares
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

TO:

[media] comment = Media share
path = /media/HDD01/shares
valid users = @server
force group = users
create mask = 0660
directory mask = 0771
read only = no
Samba 3 domain controller running on a Raspberry Pi Model B 512MB ram, 800MHz cpu speed, 4GB class 6 SD card.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Add user group?

Sat Apr 12, 2014 5:53 am

The command you're looking for is groupadd.
The google search term you're looking for is "add group in linux"

User avatar
vdweegen
Posts: 2
Joined: Sat Apr 05, 2014 6:10 pm
Location: The Netherlands
Contact: Website

Re: Add user group?

Sat Apr 12, 2014 9:03 am

usermod -a -G <group> <user>

whereas the -a flag means 'append', the -G flag means group(s)

Look here for more information: http://www.cyberciti.biz/faq/howto-linu ... -to-group/
Raspberry Pi Model B, OpenElec 3.2.4 - Media Center
Raspberry Pi Model B, Raspbian - Download Server (lvm, smb, transmission, flexget)

Jared_S
Posts: 19
Joined: Sat Apr 12, 2014 1:50 am
Location: US

Re: Add user group?

Sat Apr 12, 2014 12:47 pm

Thanks! It works now.
Samba 3 domain controller running on a Raspberry Pi Model B 512MB ram, 800MHz cpu speed, 4GB class 6 SD card.

Return to “Advanced users”