LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to block sudo -i in sudoers file (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-block-sudo-i-in-sudoers-file-938029/)

smilemukul 04-04-2012 03:32 AM

How to block sudo -i in sudoers file
 
Hi,

How to block sudo -i in sudoers file ?

unSpawn 04-04-2012 08:24 PM

Something like "user-spec host-spec = command_spec, !/usr/bin/sudo *-i*"?

smilemukul 04-04-2012 10:36 PM

I tried as user ALL=(ALL), !/usr/bin/sudo *-i* but its not working.Can you suggest any other solution ?

unSpawn 04-06-2012 03:11 AM

Quote:

Originally Posted by smilemukul (Post 4645056)
I tried as user ALL=(ALL), !/usr/bin/sudo *-i* but its not working.Can you suggest any other solution ?

Please post actual output of the unprivileged user running 'sudo -l' and 'sudo -i' but do obfuscate individual entries like ", /xxx/xxx --xxx, /xxx/xxx --xx-x, " so we can have a good view of what's listed.

smilemukul 04-08-2012 07:51 AM

Actually " sudo -i " needs to be block for the users where they have sudo access but need to block sudo -i so that users can only access certain task through sudo with only their username as " sudo - <username " & not through "sudo -i" as there are many options to login through sudo.


All times are GMT -5. The time now is 01:13 PM.