Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I installed Debian Lenny few minutes ago and I have a big problem.

I created an user successfully. I can login with GDM. For now everything works perfectly.

But, when I try to run root terminal, run Synaptic, it prompts for a root password. When I enter it...nothing happens. Window just disappear and nothing happens.

When I try:

 sudo aptitude install package_name

when I enter my password I'm getting:

user is not in the sudoers file.  This incident will be reported.

When I try su after providing correct root password I'm getting "Authorization failed".

Any ideas how to solve it?

share|improve this question
up vote 2 down vote accepted

You probably set your password with the wrong keymap. You can recover by booting into "single" user mode.

When boot loader comes up:

  • Choose kernel to boot (arrow keys)
  • Press "e" to edit the entry.
  • Use the arrows to go to kernel line.
  • Press "e" to edit this entry.
  • At the end of the line add the word "init=/bin/bash"
  • Press "ESC" to go back to the parent menu.
  • Press b to boot this kernel

Now you will enter single user mode without having to enter root's password. You need to remount the root filesystem to read-write with:

# mount -o remount,rw /

Change password for root with:

# passwd root

Remount the filesystem to read-only again:

# mount -o remount,ro /

Now reboot and you are all set.

share|improve this answer
Now tell me please, how did you know it was wrong password? I spent over 9 hours trying to figure it out. Thanks!!! – maya Sep 3 '10 at 15:50
I have done the same thing myself ;-) – rkthkr Sep 5 '10 at 12:52

Debian doesn't automatically add users to the sudo list as Ubuntu variants do. You will have to use visudo as root (when you recover the password) and add user to the authorised list.

share|improve this answer

why dont reset the passwd for root

A reboot the server if your using 9.04 and above then you need to hold "shift" key while rebooting the server use down arrow key last option for single use mode $passwd root

B if your using old version of ubuntu then while rebooting press "ESC" boot in single user mode

and follow the step from following link

share|improve this answer
"9.04" is Ubuntu - the poster said "Debian Lenny". – Teddy Sep 3 '10 at 15:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.