This question already has an answer here:

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)

marked as duplicate by karel, fixer1234, DavidPostill, mdpc, nc4pk Dec 29 '15 at 2:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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. – E2Busy Dec 25 '15 at 2:21
  • Thanks, I will try this when I have a live OS (in my usb). – aviit Dec 25 '15 at 2:25

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


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. – aviit Dec 25 '15 at 6:41
  • Did you follow alternative methods available in that site? I gave you a common method. That site explains some other methods. – Sachith Dec 25 '15 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 – aviit Dec 25 '15 at 7:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.