LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Restore root groups on Fedora (https://www.linuxquestions.org/questions/linux-newbie-8/restore-root-groups-on-fedora-700794/)

seses 01-29-2009 08:04 AM

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..

ilikejam 01-29-2009 08:07 AM

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

amani 01-29-2009 08:10 AM

Do read the manual

#man usermod

seses 02-02-2009 03:00 AM

Thanks Dave, that worked great.


All times are GMT -5. The time now is 01:12 PM.