LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 09-02-2010, 05:05 AM   #1
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
change group id


I want to change the user group ( gid ) , I know the command "id" can check such user information ( uid , gid , groups ) , but if I want to change the gid , what can i do ?

ps. except direct update /etc/passwd .

Thx.
 
Old 09-02-2010, 05:15 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
man groupmod
Quote:
OPTIONS
The options which apply to the groupmod command are:

-g, --gid GID
The group ID of the given GROUP will be changed to GID.
 
Old 09-02-2010, 05:29 AM   #3
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by linuxlover.chaitanya View Post
man groupmod
Thx reply ,

groupmod should be used to change the group name , right ?

What i want is to change existing user 's gid .
 
Old 09-02-2010, 05:37 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Then you need usermod:

Quote:
-g, --gid GROUP
The group name or number of the users new initial login group. The
group must exist.
 
  


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
Secondary group users need to change the file permissions of primary group files? sunnybmv Linux - Newbie 3 12-10-2009 05:57 PM
Change group nameh ericunicast Linux - General 1 08-30-2006 01:13 AM
how to change uid group id mfrangos79 Linux - General 1 11-07-2005 08:19 PM
change group blackzone Linux - Newbie 3 12-14-2004 05:30 AM
how to change user group ? Menestrel Linux - Newbie 7 05-21-2004 12:09 AM


All times are GMT -5. The time now is 09:11 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration