View previous topic :: View next topic |
Author |
Message |
asroka n00b
Joined: 01 Nov 2002 Posts: 19 Location: Los Angeles, CA USA
|
Posted: Fri Aug 05, 2005 9:38 am Post subject: groupadd/useradd fail to open files [Solved] |
|
|
Running hardened with SELinux on x86.
groupadd/useradd both fail at various times with "unable to open group/password/shadow password file" (Not all three, but I have seen each individually.)
I've noticed that sometimes there is a leftover /etc/.pwd.lock file. Manually deleting this doesn't cause any additional problems, but it doesn't fix the issue either.
Can't find anything on google even remotely addressing this. It's wierd. Usually happens when I'm trying to emerge something (The last time was qmail, but it has happened on other packages.) I've worked around it by manually editing the files (Since the users that are created will never logon so SELinux issues don't matter,) but I'd like to have a real solution (In case I need to add an actual user
Last edited by asroka on Sat Aug 06, 2005 4:05 am; edited 1 time in total |
|
Back to top |
|
|
asroka n00b
Joined: 01 Nov 2002 Posts: 19 Location: Los Angeles, CA USA
|
Posted: Sat Aug 06, 2005 4:05 am Post subject: |
|
|
This was an SELinux issue. At some point I touched one of the files. This caused the file to get locked out.
The solution was this:
restorecon /etc/group
restorecon /etc/passwd
restorecon /etc/shadow
The vexing part is that I couldn't find this anywhere online when I was looking for "unable to open group file" but it was in the O'Reilly SELinux book.
Mental note: editing password files by hand is considered harmful. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|