I have a Debian desktop. On last time, I had updated/upgraded. Now I cannot login (maybe I forgotten username). I cannot login to root too. It seems that we cannot login with root (we just can switch to root). I can make sure about the password. How can I retrieve the username? Thanks!
(There are no GUI to login here after update, just a black screen asking for username/password)
-
Boot to live OS and go to the drive of Debian. Look through the file system until your find a folder containing the different users and their home directory.– Racing121Dec 25, 2015 at 2:21
-
Thanks, I will try this when I have a live OS (in my usb).– aviitDec 25, 2015 at 2:25
Add a comment
|
1 Answer
First go to Grub boot menu. (If you can't see it, press "ESC" key)
Press 'e' to get edit option for Grub
Go to Kernel option line and again press "e"
Remove quiet splash
and add init=/bin/bash
press Enter and then "b" to boot
Then you will get a bash command prompt, type
mount -o remount,rw / mount -o remount,rw /proc
To change your password, type
passwd
Enter your new password and reboot using sync
This siteContains more details. If these options are not working, please refer this site.
-
Thanks, I tried this without error but the problem was not resolved. I still cannot login. After reboot to a bash command prompt, I can see my usrename when
cat /etc/passwd
. I also changed/updated the password for both the user and root.– aviitDec 25, 2015 at 6:41 -
Did you follow alternative methods available in that site? I gave you a common method. That site explains some other methods. Dec 25, 2015 at 7:25
-
Yes, I did as your link to add
init=/bin/bash
then I can enter to a bash shell. In this, I run commands to see file /etc/passwd and to update the password– aviitDec 25, 2015 at 7:35