(ALL, !root, !#0) as runas does not work as expected

Michael Coulter mjc at bitz.ca
Tue Dec 10 14:36:27 EST 2002


The above syntax only seems to prevent running as "root",
however it happily allows sudo -u xxroot (where xxroot is
another uid 0 user).

The whole line looks like so

user	ALL = (ALL, !root, !#0) NOPASSWD: /bin/sh

Visudo doesn't syntax errors, so I'm puzzled what
!#0 actually does, and if I've made a subtle error
somewhere ?

More information about the sudo-users mailing list