0

Whenever I use sudo in Ubuntu 16.04.2 LTS I'm not being asked for the password of the user that is invoking it.

# 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:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

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

# Members of the admin group may gain root privileges
%admin 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

any ideas?

3
  • 1
    one thing ... on multiple invocations of sudo withing a certain time period (I think 5 minutes) after the first ask for password ... subsequent use will NOT ask for a password until that time is expired (from the first time) ... do you think this might be what is occurring? Jun 8, 2017 at 19:02
  • 1
    sudo -k will invalidate cached credentials, id will show that you're (not) running with $UID = 0.
    – waltinator
    Jun 8, 2017 at 19:04
  • Ok, so according to the Ubuntu documentation "When using sudo, your password is stored by default for 15 minutes. After that time, you will need to enter your password again. " I've had put my laptop into sleep mode the other day and was sure that the clock is running (the same way it does when powering off) but was surprised that it didn't ask me for the password after almost 20 hours ..... or am I missing something here ?
    – cyzczy
    Jun 8, 2017 at 20:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.