Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I created a new user and set its option to "root". Then I switched the option of the user which was activated to "standard" and closed the window. But now I can't login as the new user because I didn't set a password and so the user which is root is not activated. What shall I do?

share|improve this question

marked as duplicate by Eliah Kagan, Eric Carvalho, Sylvain Pineau, muru, mikewhatever Sep 28 at 18:56

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.

1 Answer 1

Does GRUB show you the recovery mode? If yes, select it, and then root console. Now type mount -o rw,remount /, then passwd <ReplaceByUsername>. Now enter the new password twice and reboot.

If you don't see GRUB, hit Esc or Shift (depends on your system), or Ctrl+Alt+Del during boot.

If even this doesn't work, boot a Ubuntu Live System and do the following things:

  1. Enter sudo fdisk -l and search the partition with "Linux" system
  2. Mount this partition: sudo mkdir /media/sdXX && sudo mount /dev/sdXX /media/sdXX (Replace the Xes by the values in the partition file name)
  3. Now login as root user on your installed system: sudo chroot /media/sdXX
  4. Type passwd <ReplaceByUsername>
  5. Reboot your installed system and you should be fine.
share|improve this answer

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