PDA

View Full Version : [ubuntu] 8.10 server no longer requires sudo



sand0z
February 4th, 2009, 03:33 AM
I forgot my account password for an Ubuntu 8.10 server and found this procedure to log in and change it:

Turn your computer on.
Press ESC at the grub prompt.
Press e for edit.
Highlight the line that begins kernel ………, press e
Go to the very end of the line, add rw init=/bin/bash
press enter, then press b to boot your system.
Your system will boot up to a passwordless root shell.
Type in passwd username
Set your password.

This did what I wanted it to do, but I found out that afterward I no longer needed to sudo into commands that previously required it. The changes described above did not appear in successive reboots, but I'm baffled at what might have occurred that changed the system behavior. Anyone have any ideas?

Thanks.

cariboo
February 4th, 2009, 04:50 AM
If you reboot you should be back to normal, changes you make to menu.lst at the boot menu are only temporary.

You didn't have to go to all the effort, if you boot into recovery mode you can reset you user password at the root prompt.

Jim

sand0z
February 4th, 2009, 05:03 AM
My original description was a bit off. It is not that I no longer have to sudo, but when I do, the system no longer prompts me for my password. This strangeness persists after 3 reboots.

Thanks for the response and the password recovery shortcut.

Alex

cdenley
February 4th, 2009, 03:34 PM
By default, sudo timestamps timeout after 15 minutes. This means once you use sudo, you can use it again for fifteen minutes in the same TTY (terminal number) without needing a password. The timestamp is still valid if you reboot. I suggest you disable timestamps by editing this line:


Defaults env_reset,timestamp_timeout=0

in your sudoers file using this command:


sudo EDITOR=gedit visudo