0

Why sudo command is not working on my fresh debian installation. I had this error after entering my root password:

Sorry try again ..

or / and

incorrect password attempt

EDIT : In my /etc/sudoers, I have the default content :

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    mail_badpass
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL
myuser ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

I am sure that I am typing the right password.

Update:

When the system locks the screen, I can't log in. This is the auth log:

polkitd(authority=local): Unregistered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session8 (system bus name :1.124, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
8
  • 2
    You are in the sudo group?
    – wurtel
    Commented Dec 1, 2014 at 13:45
  • @wurtel presumably the myuser negates the need for that.
    – muru
    Commented Dec 1, 2014 at 13:46
  • Ah, I didn't look at the contents as you wrote that the default contents were in the file... apparently not. You did use visudo to edit it? Check /var/log/auth.log for hints.
    – wurtel
    Commented Dec 1, 2014 at 13:48
  • I am in the sudo group and I the content of sudoers is not exatly the same (format, comments ..etc= but the configuration is the same.
    – 4m1nh4j1
    Commented Dec 1, 2014 at 13:50
  • 1
    You need to enter your own password - not root with sudo. Commented Dec 1, 2014 at 14:24

1 Answer 1

3

sudo command requires password of current user, not root user. If you wish to authorize by root password you can just use su -.

1
  • I know and anyway my root password is the same as "myuser" password. sudo command is not working and su - is working, this is my problem.
    – 4m1nh4j1
    Commented Dec 2, 2014 at 7:48

You must log in to answer this question.

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