1

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?

s3lph
  • 14,314
  • 11
  • 59
  • 82
Anja Smith
  • 11
  • 1

1 Answers1

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.
s3lph
  • 14,314
  • 11
  • 59
  • 82