Bugzilla – Bug 76
mail_always causing sudo to fail
Last modified: 2003-03-19 23:23:03 MST
If you set mail_always and then try to run "sudo su user" the su command will fail: [thiago@hermes thiago]$ alias w=whoami [thiago@hermes thiago]$ w thiago [thiago@hermes thiago]$ sudo su teste [thiago@hermes thiago]$ stty: standard input: Input/output error [teste@hermes thiago]$ w thiago [thiago@hermes thiago]$ [teste@hermes thiago]$ [thiago@hermes thiago]$ exit [thiago@hermes thiago]$ I alias'ed w to whoami because after the error any key you type is accepted as a command, thus when I tried to type whoami it issued the command 'w', then 'a', then etc. My sudoers: Defaults syslog=auth, mail_always, insults User_Alias OPERADOR = user1,\ user2,\ thiago Cmnd_Alias SU = /bin/su, /usr/bin/passwd root ALL=(ALL) ALL OPERADOR hermes = /bin/su [!-]*,\ !/bin/su *root*,\ !/bin/su *OPERADOR* OPERADOR hermes = /usr/bin/passwd [!-]*,\ !/usr/bin/passwd *root*,\ !/usr/bin/passwd *OPERADOR* By the way, *OPERADOR* doesn't work, I was only testing :-). I still received the command log by mail as expected, though.
I believe this is the same issue as bug #102. There is a patch for the problem attached to that bug number. *** This bug has been marked as a duplicate of 102 ***