[sudo-users] Sudo user cannot execute commands

Todd C. Miller Todd.Miller at courtesan.com
Mon May 19 11:38:12 EDT 2008


In message <e8401e700805190828t3a563dbfs425e6db76ded2e78 at mail.gmail.com>
	so spake "Valdemir Santos" (valdemirs):

> # User privilege specification
> root    ALL=(ALL) ALL
> valdemir        ALL=/usr/bin/w

The above line lets valdemir run /usr/bin/w as root.  It is
equivalent to:

valdemir        ALL=(root) /usr/bin/w

> solaris   / > id
> uid=2142(valdemir) gid=10(staff)
> solaris   / > sudo -u valdemir w
> Sorry, user valdemir is not allowed to execute '/usr/bin/w' as valdemir on
> ugmtzsux007.

But you are trying to run w as valdemir.  If you were to do:

$ sudo w

as valdemir it would work.  If you wish to allow valdemir to run w
as any user you would use a line like:

valdemir        ALL=(ALL) /usr/bin/w

 - todd



More information about the sudo-users mailing list