How to add Group on Ubuntu

May 15, 2009 · Posted in Ubuntu, Unix 

You can add a group and add user to a group using unix command.

In this example, i use linux ubuntu to do it

Add a Group

sudo groupadd samba

Add user to Group

sudo adduser johnson samba

To check what Group user belong to

group [username]

eg:

root@ubuntu:/# groups test
test users

Add a existing user to existing group

usermod -g [group name] [username]

eg:

root@ubuntu:/# usermod -g it techkaki

Comments

Leave a Reply