LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   make sudo ask for a password (https://www.linuxquestions.org/questions/linux-security-4/make-sudo-ask-for-a-password-277479/)

andy753421 01-13-2005 05:06 PM

make sudo ask for a password
 
sorry if this has been asked before. but how do you make sudo ask for the root password whenever you use it? I dont really want to have my desktop laying around with anyone being able to run anything without any passwords. I've tried some stuff but none of it seems to work. Anyway here's my files.
note: I'm in the wheel group

/etc/pam.d/sudo =
#%PAM-1.0

auth required /lib/security/pam_stack.so service=system-auth
auth required /lib/security/pam_nologin.so


/etc/sudoers =
Defaults env_reset
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL

adriaanbw 01-13-2005 07:32 PM

You could set up an alias for sudo:
Code:

$ alias sudo='su -c'
that will essentially call su for a one line command each time.


All times are GMT -5. The time now is 11:56 PM.