Visit Jeremy's Blog.
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 01-29-2009, 08:04 AM   #1
LQ Newbie
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Restore root groups on Fedora

I'm pretty new to linux (working on fedora) and managed to mess something up, hopefully u can help me to undo it!

While logged in as root I added root to the named group with the command:
usermod -G named root

What i didnt realise was that this command also takes root out of every group except named and root.

I had a 2 month old backup of the passwd file, I thought this would revert the groups back to what they had been 2 months ago but when I tried it root is still just a member of named and root.

I want root to be a member of all the groups it was a member of before I executed this command.
Any help would be appreciated..
Old 01-29-2009, 08:07 AM   #2
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97

Unless you've got a backup of /etc/group , you're out of luck. If you do happen to have a backup, just replace the root line in /etc/group with the line from the backup.

Old 01-29-2009, 08:10 AM   #3
Senior Member
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Do read the manual

#man usermod

Last edited by amani; 01-29-2009 at 08:11 AM.
Old 02-02-2009, 03:00 AM   #4
LQ Newbie
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks Dave, that worked great.


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
Does root belong to all groups - Permissions Question Cocytus1 Linux - Newbie 4 04-26-2008 03:50 PM
Restore root access, ip lockout tonykn Linux - Newbie 14 02-08-2006 06:13 PM
Backup & Restore Groups and Users jorasmi Slackware 2 03-28-2005 02:24 AM
default groups root belongs too Hcman Slackware 2 05-26-2003 03:49 PM
su root command returns 'cannot set groups...' golgotha Linux - Newbie 2 04-08-2003 09:47 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 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
Open Source Consulting | Domain Registration