Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Lost user password
Login as root into a terminal window. Do
cat /etc/passwords
If the second field ( : is the field separator ) of /etc/passwd is an x like in
user:x:1000:1000:User:/home/user:/bin/bash
for the user the password has to be changed for open /etc/shadow in an editor otherwise /etc/passwd .
Remove the second field, the hash, (the long string with all kind of characters in it. In our example is t is sdkjff3489ooe8ru_and_so_on) like in
user:sdkjff3489ooe8ru_and_so_on:34345:0:99999:7:::
for the users you want to reset the password for. The line of the user entry now looks like this for:
/etc/password:
user::1000:1000:User:/home/user:/bin/bash
and for:
/etc/shadow:
user::34345:0:99999:7:::
Save the file and exit the editor. Do
su user
Now a new user password can be entered
Lost root password
The fast and easy way (Dutch)
Vertixo Informatiepunt:Wachtwoord vergeten debian
Alternative
Boot the computer with a boot CD (li/ke Parted Magic) or boot USB stick.
Find the root partition, the partition with the /etc directory in it.
find / -type d -iname etc/
You are looking for an /etc directory in /mnt or /media in most cases.
Do (replace /media/sda1 with the location on your computer)
cd /media/sda1 cat /etc/passwd
If the second field ( : is the field separator ) of /etc/passwd is an x like in
root:x:0:0:root:/root:/bin/bash
open /etc/shadow in an editor otherwise open /etc/passwd in an editor.
Remove the second field, the hash, (the long string with al kind of characters in it. In our example is t is sdkjff3489ooe8ru_and_so_on) like in
root:sdkjff3489ooe8ru_and_so_on:34345:0:99999:7:::
for the users you want to reset the password for. The line of the user entry now looks like this:
/etc/password:
root::0:0:root:/root:/bin/bash
/etc/shadow:
user::34345:0:99999:7:::
Save the edited file and reboot your system. After the system has been started up again you can set a new root password
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.