LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-26-2012, 03:07 PM   #1
praveenvikram24r
LQ Newbie
 
Registered: Sep 2011
Posts: 10

Rep: Reputation: Disabled
Useradd to group


hi,

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

Thanks&Regards,

R.PRAVEEN
 
Old 07-26-2012, 03:19 PM   #2
Kustom42
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
metallica1973
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

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

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

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

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

http://www.cyberciti.biz/faq/howto-l...user-to-group/
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:54 AM.

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