![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 | Thread Starter | Forum | Replies | Last Post |
| Adding user to a group without SAM | paqman | HP-UX | 2 | 08-15-2007 04:05 AM |
| Adding quota for a group | manoranjan | UNIX for Advanced & Expert Users | 1 | 12-21-2006 01:35 PM |
| Adding users to /etc/group | golfhakker | UNIX for Dummies Questions & Answers | 1 | 03-30-2006 01:27 PM |
| Adding root user to a group | The Specialist | UNIX for Dummies Questions & Answers | 7 | 10-28-2005 07:09 PM |
| Adding an extension to a group of filenames | pepintheshort | UNIX for Dummies Questions & Answers | 9 | 04-09-2004 05:11 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Adding a user to a group
Now, its been a while since i done this but I had to add a user to a group. I did that by using the usermod command and now when I superuser to the user's account and issue a "id", i get the desired gid.
i mean, output of id indicated the user is assigned to the group i want him to be in. also when I superuser to the users account and issued the "groups" command, the desired group name is displayed. now, my question is, although every output of all the commands I typed indicated that this user now belongs to the group i want him to belong to, how come when i do a cat /etc/group | grep groupname, i do not see the user's name in the list of allowed users??? am i doing something wrong here??? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
The default gid is in /etc/passwd and that is what you changed. This may or may not have been an error. Did you want the user to retain membership in his old group? A user can be a member of several groups at once by adding him into various lines in /etc/group. It all depends on what you really want.
And hp-ux is a little odd here, but I seem to rememeber that you use sunos. |
|
#3
|
||||
|
||||
|
If you want to set the default group (ie, what's in /etc/passwd) and set the supplemental group memberships (ie, what's in /etc/group), you can do something like the following:
usermod -g users -G apps,sysadmin kduffin Cheers, Keith Last edited by kduffin; 11-17-2003 at 07:42 PM. |
|
#4
|
|||
|
|||
|
what am saying is this
when you do a cat /etc/group | grep (desire groupname) you should get an output similar to this: groupname::45:james,lola,jerry the last names james, lola and jerry belong to the group called groupname. my questions is, how come after using the usermod to change the group of my user, how come his name does not appear in the /etc/group as being a member of the group??? i mean if i added the user to the group called groupname, i would expect the damn username to be added right behind jerry. right??? |
|
#5
|
||||
|
||||
|
Hi,
Like Perderabo said, you are only changing your default group, and that information is on /etc/passwd on most unix systems, not on /etc/group. If you default group is "other", you wont see your userid in front of other: line on /etc/group. Your userid will be on /etc/group if you belong to more that one group or if your user has a group for himself ( like seen on linux distributions ). |
|
#6
|
|||
|
|||
|
Why don't you just go into /etc/passwd and /etc/group to make the changes you want?
|
|||
| Google The UNIX and Linux Forums |