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

Rep: Reputation: 0
Restore root groups on Fedora


Hi
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, 09:07 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

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.

Dave
 
Old 01-29-2009, 09:10 AM   #3
amani
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 09:11 AM.
 
Old 02-02-2009, 04:00 AM   #4
seses
LQ Newbie
 
Registered: Jan 2009
Posts: 2

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


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


All times are GMT -5. The time now is 02:27 AM.

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