Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-05-2006, 12:14 PM   #1
Registered: Jan 2006
Posts: 44

Rep: Reputation: 15
I want to create a new group for users

Hi ,

i want to create a new group ,and i want to create users for that group,How can i perform that

Old 12-05-2006, 12:26 PM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
groupadd to create groups, useradd to create users
Old 12-05-2006, 01:01 PM   #3
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
you can also add them manually using the command vigr or writing to the file /etc/group
Old 12-05-2006, 01:11 PM   #4
Senior Member
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Originally Posted by sathish80
Hi ,

i want to create a new group ,and i want to create users for that group,How can i perform that

What distro are you using. some distros have created scripts for you. Like Zenwalk and slackware use adduser script that just ask you simple questions then build the user or group for you.
Old 12-07-2006, 07:58 AM   #5
LQ Newbie
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0

[root@localhost /]# groupadd <groupname>

If u wanna use group quota, the users should have same primary group. Normally, primary group of "user1" is "user1" itself.
If u wanna use groups w.r.t file permissions, secondary group is used.

To add a new user "joe", n to make "mygroup" as his primary group,

[root@localhost /]# useradd -g mygroup joe

To add a new user "mary", n to make "mygroup" as her secondary group,

[root@localhost /]# useradd -G mygroup mary



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
create user with secondary group levis_inferno Linux - Networking 6 05-31-2006 01:33 AM
How to create a new group? neo_in_matrix Linux - Newbie 10 04-01-2005 09:47 AM
/etc/group - the group users empty Artanicus Linux - General 2 02-22-2005 05:25 AM
why can't i create new group luxpops Programming 10 09-11-2004 05:15 AM
how to change/create group password feetyouwell Linux - Software 3 09-06-2004 10:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration