LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I deleted some groups and passwords (https://www.linuxquestions.org/questions/linux-newbie-8/i-deleted-some-groups-and-passwords-263943/)

binarybob0001 12-08-2004 04:04 AM

I deleted some groups and passwords
 
I did something really, really stupid. I deleted groups and passwords in my /etc/passwd and /etc/group files without saving them first. I thought I only needed root and that the installation cd had just cluttered my files with useless crap as it usually does. On startup I get a bunch of messages from programs (which I guess are assigned a group and password) saying something to the effect of no group by that name exists. However, everything seems to be working fine anyways. Why were these groups made?
You don't have to remind me that I shouldn't be using root to do work. I know. I'm exploring all my configuration files because I want to go through the Linux from Scratch tutorial. I'm very interested in the innards of Linux (hint if you have any good resources on linux innards, please let me know).
My real question is whether or not there is a way to recreate the groups and passwords correctly again if necessary, or how do I get rid of the error message by making them not ask for groups?
Thanks. Everyone here has been a big help.

MasterC 12-08-2004 04:08 AM

You can edit your applications conf files to change the group to a single fake user/group and create that single fake user/group with groupadd/useradd. You can also check the conf's to see what groups it decided to use, and create them as well. However, it will be tricky because you won't know for sure if the shell needs an actual shell or if you can use /dev/null as well as the entry for the home... It's worth a shot though.

LFS is a great way to figure out the 'innards' of Linux, be sure to do it all by hand, don't use anyone's 'scripts' for automating the tasks so you can be sure to figure it all out.

Cool

binarybob0001 12-08-2004 04:27 AM

Crap, editing those conf files is going to be a lot of work. I don't even know which conf file belongs to which service. I know there is an alsa.conf and modules.conf but figuring out where locate.conf and adduser.conf etc. is, is too much work! Thanks, but I think I'll reinstall. I have backups of all my rc init files and of my current kernel configuration. However, it will probably be a couple of days so if anyone knows of an easy way to figure out what file belongs to what program, I would be very glad. Thanks.

MasterC 12-08-2004 04:31 AM

You could always post the problematic ones.

locate.conf is slocate, adduser.conf, never heard of it, can't really imagine what service it belongs too either..

Cool


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