1

This is a summary of what happened:

  • Installed Ubuntu 16.04. Working fine for months.
  • Changed my user password.
  • After logging out, I cannot login anymore, neither with the old nor with the new password.
  • My home directory is still there (so I backed it up).
  • I boot from DVD in EUFI mode and login from there.
  • With: sudo passwd $username I get the error: user does not exist.
  • Recreated my user in the sudo group: sudo adduser $username
  • Now the user directory is empty, instead of being the original one. It seems to be located in a ramdisk (?)

How can I fix this problem? How can I restore the system, recreate/restore my user in the hard disk located /home?

  • Please edit your question to include the complete output of the command 'ls -la /home' – user535733 Feb 10 '17 at 13:18
  • I just get the list of temporary users created during the live session. – Pietro Feb 10 '17 at 14:18
3

The DVD Live session does not load your hard drive by default. The whole session is different from the session you have when you boot normally to your hard drive.

You can change your password by booting into your normal session in Rescue Mode

Perform these steps:

Reboot your computer. At the grub prompt select Advance Options for Ubuntu and press ENTER. Go into Recovery Mode. (You may have to hit esc to disable the ping screen.) Continue with:

  1. Drop to root shell prompt
  2. ENTER for maintenance.
  3. Remount the root system with:
# sudo mount -o remount,rw /
# passwd "username"
# exit
  1. Resume

You should now be at the normal login with the new password in effect.

  • To get to the menu that allows me to select "Advance Options for Ubuntu", I had to: reboot, keeping F12 pressed. Select UEFI boot/Ubuntu. Press Esc once. Feel free to add this note to your answer. – Pietro Feb 10 '17 at 14:33
  • @Pietro It shouldn't be part of the answers because it's specific to your hardware. How to get the one time boot menu or BIOS/UEFI settings varies from one manufacturer to another and even between models from the same brand. Specific hardware instructions are usually off-topic. – user589808 Feb 12 '17 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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