LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   adding user to a group (https://www.linuxquestions.org/questions/linux-newbie-8/adding-user-to-a-group-97497/)

Chilipepa 09-27-2003 11:50 AM

adding user to a group
 
I created some users and later on I created a group where I'd like adding those users. In this Practical guide to linux I bought is not very clear how to do that. Is just a matter of changing the GID in the passwd file?
Please, help and patience is appreciated

Gates1026 09-27-2003 12:06 PM

check out the man pages, but it looks to me like it is

useradd -G <group name> <username>
could be -g (not really clear, just play around with it)

in RedHat the group is stored in /etc/group

david_ross 09-27-2003 12:08 PM

Welcome to LQ.

That is only the users primary group. To add a user to a normal group do it in the group file:
/etc/group

To have joe and jack inthe juser group with gid 510:
juser:x:510:joe,jack


All times are GMT -5. The time now is 05:27 PM.