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 07-26-2012, 03:07 PM   #1
LQ Newbie
Registered: Sep 2011
Posts: 10

Rep: Reputation: Disabled
Useradd to group


how to move a user to a group when creating the user id in linux


Old 07-26-2012, 03:19 PM   #2
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Your best resource for these questions is the man page.

Do the command:

man useradd

And review the options.

I know the answer but this is the teach a man to fish thing, take a look over the man page and you should have your answer in a few seconds. If you have any other questions we will be happy to help
Old 07-26-2012, 04:50 PM   #3
Senior Member
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
This should help:

add a new user to primary groups

useradd -g developers tony
Add a existing user to existing group

usermod -a -G ftp tony
add a new user to groups

useradd -G {group-name} username
Adding users to supplemental groups:

useradd -G admins,ftp,www,developers jerry
and etc.


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
Can not create new user (useradd: unknown group MyGroup) thomas2004ch Linux - Software 1 06-07-2010 07:57 AM
'useradd' wrong id for group 'users' JokerBoy Slackware 2 02-12-2010 03:44 PM
useradd and multiple group question bar338 Linux - Newbie 3 11-23-2009 11:05 AM
Useradd - Cannot locate /etc/default/useradd in Solaris Paean Solaris / OpenSolaris 4 12-09-2005 02:36 AM
useradd: unknown group turbofisch Linux - Newbie 4 04-06-2004 07:19 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:20 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
Open Source Consulting | Domain Registration