Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lo and behold, I log into my machine today, as every day, su root and it doesn't accept my root password any more. How could that possibly happen, assuming I didn't sleepwalk over to my machine during the night and change the password before going back to bed? Is it possible for me to regain control of this machine or is it game over?

share|improve this question
Did you change your keyboard layout by accident? – evnu Sep 15 '10 at 10:38

You can regain control by:

  • Booting in single user mode (on grub, edit actual kernel by pressing e, add "single" at the end, boot with b
  • Boot a live CD, chroot (google this)
  • in both ways, then change your password

But: If you can't recall yourself changing the password, reinstall that machine!

share|improve this answer

In Ubuntu you are probably still a "sudoer", so you should be able to use sudo with your user password (not the root one). From there you are then able to reset root's password.

$ sudo passwd
share|improve this answer

Before you reload your system try using chage to see when the password was changed (if it was) or if its simply expired. You can also check /var/log/secure.

reinstalling a system simply because the password expired would be pretty silly.

share|improve this answer

I have had "password" issues when my root directory (/) is 100% full.

I run a cron script which rsyncs to an external hard drive which wasn't mounted at runtime. rsync doesn't care what device/partition the directory is mapped to, so it went ahead and filled up /external_hd. Normally, /external_hd is the 1TB device sitting on top of my computer tower. But when it's not mounted (e.g. the external hard drive is not on), the directory is still there, so it writes to the / partition (by default it'd create the directory anyway, I believe). Next time I restarted I couldn't log in to Ubuntu, getting an error on user name/password. Once I deleted files, everything worked as expected.

I've also had this issue when running Amazon's MP3 downloader and a full /. It gives you a permissions type error and running the app under gksudo doesn't solve it.

Eventually, I stopped being so lazy and changed the script to skip rsyncing to external if it wasn't mounted.

share|improve this answer

I like the solution of "honk" but you can shorten that: sudo passwd is enough to change the password of root. :-)

(Can't comment" on his answer, so I'm posting a new one)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .