|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Adding root user to a group
Hey everyone, I need a little help....
I need to add my root user to a new group I have created, I'm just alittle unsure how to do this. I know I need to use the 'useradd' command, the user 'root' needs to be added to a new group called 'beoper' and retain his membership in the following groups - 'other, root, bin, sys, adm, uucp, mail, tty, lp, nuucp, daemon' Could someone please show me the correct syntax to perform this function, I really can't afford to screw this one up. Thanks. ![]() |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
You have things slightly mixed up. useradd is used to add a new user to the system. If you want to edit the attributes of an existing user, you have to use usermod. Run the following command: Code:
usermod -G beoper root This will add beoper to the list of groups that root is already a member of. Here is the man page for usermod. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks for that.
![]() Do I need to list all the other groups that root is a member of ? The -G syntax states that you need to list all current groups or you will no longer be a members of those groups. I just need to make sure, I can't have any mistakes. Last edited by The Specialist; 10-22-2005 at 02:14 AM.. |
|
#4
|
||||
|
||||
|
Quote:
Quote:
I would just go and hack at the /etc/group file, and tack "root" onto the end of the beoper line (comma seperated with the other users listed). Cheers ZB |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
Quote:
Cheers ZB |
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
Quote:
|
| Sponsored Links | |
|
|
#7
|
||||
|
||||
|
Sorry for the wrong info. Actually, I always edit the /etc/group file and it really has been ages since I used the usermod command to add a user to a group.
|
| Sponsored Links | ||
|
![]() |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a user to a group | bigben1220 | Shell Programming and Scripting | 4 | 03-05-2010 02:28 AM |
| Adding User to group | saurabh84g | Solaris | 2 | 11-22-2008 12:20 PM |
| Log off mandatory after adding a user to a group to take effect? | sirbijan | BSD | 1 | 10-09-2008 05:57 AM |
| Adding user to a group without SAM | paqman | HP-UX | 2 | 08-15-2007 07:05 AM |
| Adding a user to a group | TRUEST | UNIX for Dummies Questions & Answers | 5 | 11-14-2003 10:28 AM |
|
|