Click to See Complete Forum and Search --> : Unable to adduser or deluser


mike8706
08-13-2006, 09:48 PM
I am unable to add a user or even delete a user. When I use the adduser command it comes back with the error "useradd: cannot open shadow password file." Please help! This system has been taken offline, so there are no issues with security. I have been trying to blank the passwords so that I can access the users email accounts.

serz
08-14-2006, 03:19 AM
Hmm.. you should check the permissions of the file /etc/shadow, it should be like this:
root@c0ma:/usr/src# ls -l /etc/shadow
-rw-r----- 1 root shadow 682 2006-07-03 08:05 /etc/shadow
chmod 0640 /etc/shadow

If that doesn't work because you lost the shadow file or something you can try using the "shadowconfig off" command to disable the password shadowing and then enable it back with "shadowconfig on".

serz
08-14-2006, 03:22 AM
Hmm.. you should check the permissions of the file /etc/shadow, it should be like this:
root@c0ma:/usr/src# ls -l /etc/shadow
-rw-r----- 1 root shadow 682 2006-07-03 08:05 /etc/shadowchmod 0640 /etc/shadow

If that doesn't work because you lost the shadow file or something you can try using the "shadowconfig off" command to disable the password shadowing and then enable it back with "shadowconfig on".

mike8706
08-14-2006, 09:22 AM
I did the ls command on the shadow file and it showed this:
-r-------- 1 root root 2608 Aug 7 16:40 /etc/shadow
Then I tried to chmod it, but it came back:
bash: /bin/chmod: Text file busy
After that I tried to do the shadowconfig off command, but that didn't work at all.