0

sudo commands are running without any passwords. I had not made any setting to make something like "sudo without password"
This view show how sudois running without prompting for password

user@user:~$ sudo su --
root@user:/home/user# exit
exit
usrer@user:~$ who am i
user   pts/0        2014-10-01 15:29 (:0)
user@user:~$ sudo chown -R user:user /opt/lampp/htdocs
user@user:~$ <br/>

Is this a system problem and need update or smth else I did updated my system yesterday
this is /etc/sudoers
`

#
# 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

# 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`


and sudoers.d

#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
# 
#   #includedir /etc/sudoers.d
# 
# This will cause sudo to read and parse any files in the /etc/sudoers.d 
# directory that do not end in '~' or contain a '.' character.
# 
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
# 
# Note also, that because sudoers contents can vary widely, no attempt is 
# made to add this directive to existing sudoers files on upgrade.  Feel free
# to add the above directive to the end of your /etc/sudoers file to enable 
# this functionality for existing installations if you wish!
#
# Finally, please note that using the visudo command is the recommended way
# to update sudoers content, since it protects against many failure modes.
# See the man page for visudo for more information.
#


abdul qayyum
  • 263
  • 3
  • 15
  • 1
    Can you share the content of your `/etc/sudoers` file ? And the content of any file present under `/etc/sudoers.d` directory ? – Benoit Oct 01 '14 at 11:24
  • 2
    By default, `sudo` remembers your password for 15 minutes, so you'll be able to run it without getting prompted for the password until 15 minutes later. Read this question and for more information: [How often is the password asked for sudo commands? Where can I set it up?](http://askubuntu.com/q/309202/52726) Read this answer: [Execute sudo without Password?](http://askubuntu.com/a/147265/52726) to understand how you can make `sudo` work without a password and check your settings. – Alaa Ali Oct 01 '14 at 11:47
  • I have added both files to get some thoughts from you. It just solved by itself might be due to 15 min time setting as stated by @AlaaAli. – abdul qayyum Oct 01 '14 at 12:12
  • Great! Can you add that as a self answer? Otherwise the question stays unanswered. – Volker Siegel Oct 01 '14 at 12:30

0 Answers0