Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 3008  / 3 Years ago, wed, august 25, 2021, 2:30:33

I installed some software by running its install script with



sudo ./install.sh


After the installation all the accounts on my Ubuntu laptop can gain root access by simply issuing the command sudo -s, even the standard (non administrator) account. Also there is no password prompt when issuing the command sudo -s.



My /etc/sudoers looks like this:



Defaults    env_reset
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
ALL ALL=(ALL) NOPASSWD:ALL

More From » password

 Answers
0

If you look at the very bottom of your sudoers file, it says "ALL ALL=(ALL) NOPASSWD:ALL". This is the syntax for passwordless execution of sudo. Make a backup of the file and then delete that line.



Andrew


[#30453] Wednesday, August 25, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
curatekill

Total Points: 376
Total Questions: 117
Total Answers: 102

Location: Wales
Member since Mon, May 17, 2021
3 Years ago
curatekill questions
Fri, Sep 30, 22, 17:23, 2 Years ago
Sun, May 21, 23, 23:32, 1 Year ago
Sat, May 15, 21, 11:19, 3 Years ago
;