Link to home
Start Free TrialLog in
Avatar of alextesi
alextesiFlag for Italy

asked on

Linux password file LOKED

Hi i have a problem with the password file of my debian sarge.
The password file is loked.
Can you help me ?

If you need any other information ask me !


alextesi
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Hi,

    Boot into single user mode and edit /etc/shadow.
change
root:$x$lMhxxE70sV1:12696:0:99999:7:::
tp
root:::12696:0:99999:7:::

save and reboot.

There is no root password. Then
# password root
to change the root password.

Wesly
Avatar of paullamhkg
paullamhkg

'The password file is loked.'

you mean you lost your file? or the file locked?

what's the error you got when you login ?

or do you mean you lost your login password? or the root login password?

if you lost the login password or the root login password, wesly_chen already told you how to recover the login password, which is by removing the password record in /etc/shadow.

wesly_chen have a typo mistake, to change the password you should use 'passwd root'
Avatar of alextesi

ASKER

i can login into my linux distribution.
but i can't add new user.
the error
file passwd locked
what is the attrib of the /etc/passwd??

can you post the result of 'ls -l /etc/passwd' and 'ls -l /etc/shadow' here?
Here you are:

-rw-r--r--  1 root root 5206 2004-11-22 10:01 /etc/passwd
-rw-r-----  1 root shadow 4374 2004-11-22 10:01 /etc/shadow

Bye alextesi
ASKER CERTIFIED SOLUTION
Avatar of Nemesis-Services
Nemesis-Services

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nemesis-Services gave you good hints, try to read the manpage of the chattr (man chattr) before you do anything on it. since there is lots of attributes can be add to the file(s) by using the chattr.

Also backup the /etc/passwd and /etc/shadow before you do anything on it, so that even anything goes wrong you can get back the original to recover :)
thanks for the points alextesi, glad to have helped :)