Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed a particular software using the installer present using the command

sudo ./install.sh.

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

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
share|improve this question
1  
Open the install script in text editor. See what it was doing with /etc/sudoers and revert them. –  Web-E Jul 4 '13 at 10:54
1  
This may have been done by that "particular software" you mentioned. Unless they warned you that this will happen you should file this as a bug against the software. –  Takkat Jul 4 '13 at 10:54
    
Include in your question the content of /etc/sudoers. –  Eric Carvalho Jul 4 '13 at 12:28
    
pastebin.com/rf1WuHB0 My sudoers file –  coder Jul 4 '13 at 13:26
2  
Can we also get a link to where you got the script please? –  Rinzwind Jul 4 '13 at 14:04
show 2 more comments

2 Answers

up vote 5 down vote accepted

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

share|improve this answer
    
But why does non adminstrator accounts can also sudo to the root ? –  coder Jul 4 '13 at 14:36
2  
The line says "ALL", indicating all users. –  ahalverson Jul 4 '13 at 18:43
add comment

Remove this line:

ALL ALL=(ALL) NOPASSWD:ALL

But this is REALLY strange to appear, so the software (basically a script I guess) you installed is probably mallicious. You might want to start a second question, paste the contents of that script there, and ask for advice... this is scary!

share|improve this answer
    
But why does non adminstrator accounts can also sudo to the root ? –  coder Jul 4 '13 at 14:39
1  
Because that's exactly what that line says? ALL is the keyword here. The line starting with %admin says that all members of group admin have sudo rights, and this line says that everyone has it. –  Nanne Jul 4 '13 at 14:40
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.