Did you know LQ has a Linux Hardware Compatibility List?
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 12-09-2003, 03:39 PM   #1
Registered: Feb 2003
Location: Los Angeles
Distribution: Red Hat 8.0
Posts: 68

Rep: Reputation: 15
change a user's gid

How do I change a user's gid. I've used the newgrp command and successfully changed it, but it doesn't stick. Any help would be appreciated. Thanks
Old 12-09-2003, 03:46 PM   #2
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
You could edit /etc/passwd directly... 4th field = group number
Old 12-09-2003, 03:52 PM   #3
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
usermod [-g group] login

-g group
An existing group's integer ID or character-string name. It redefines the user's primary group membership. This option is ignored if the login is administered by the Network Information Service (NIS).
Old 12-09-2003, 05:40 PM   #4
Registered: Feb 2003
Location: Los Angeles
Distribution: Red Hat 8.0
Posts: 68

Original Poster
Rep: Reputation: 15
thanks, both answers were very helpful.


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
How do I change a user's primary group? Akhran Linux - Newbie 4 03-19-2010 09:54 PM
How can I change a user's uid and gid? homesp Debian 2 05-31-2005 03:39 PM
change user's ulimit (open files) mpregent Linux - Newbie 1 07-07-2004 03:59 PM
how to change a user's Home directory n1wil Linux - General 8 08-24-2002 04:22 PM
Why do user's passwords change? J_Szucs *BSD 7 07-09-2002 04:46 PM

All times are GMT -5. The time now is 04:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration