Cannot log on administrator or standard account

Asked by wim buys on 2012-05-23

I installed Ubuntu on an older desktop pc as the only os, using a live cd i downloaded and burned on a disk.
After booting from cd-rom ubuntu came with an error and made a desktop version. I installed Ubuntu from an icon on this desktop version.
After this installation I installed an administrator and standard accounts with passwords.
There was no possibility to power off, therefor I replaced Grub, using these commands:
As I couldn't open a new terminal I used Ctrl F2, where the commands to replace grub worked.
At the end of this command chain Ubuntu powered off.
After this I could reboot from harddisk.
After this I could not login with my adminstrator or user account. Only as a guest.
I tried with a danish and an english keyboard layout, but I donnot succeed to logon.
I am a new user of Ubuntu.
Can anyone help me?

Question information

English Edit question
Ubuntu shadow Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:

Hold shift at boot and select recovery mode, then select root. You can now run:

passwd foo

Change foo for your username:

passwd andy

Then set your new password then run:


You can now log in with your new password

wim buys (wihimbuys) said : #2

After boot with shift down I could select recovery mode.
But after that I could not find out how to select root.
I tried with 'e' and found a commando line and some commands a bit like dos
something alike set root = '(dos0,??) But it didnot work.

I think that I do not get an option to choose 'select root' ?

wim buys (wihimbuys) said : #3

After selecting `recovery mode` I end up in the normal login screen.
I tried ctrl-alt-F2 but the passwd foo or root does not work here.
I cannot reinstall grub, the guest manager account doesnot permit changes.
Do I have to reinstall the whole OS?

wim buys (wihimbuys) said : #4

Thanks actionparsnip, that solved my question.