Different commands have different flags?

Jonathan Sherman maimud at mindspring.com
Fri Feb 7 16:52:11 EST 2003


Is there any way for a single command or set of commands to have special
flags?

For example, I want to give a user the ability to sudo /bin/cat and that's
all they'll normally want to do.  However, they'll sometimes need to do
something else, like reboot the machine.  I want to make it so that when
they do a sudo reboot, they will see a different prompt, such as: "You are
$u on $h, if you really want to do this, enter your password: "

More specifically, I want to be able to give a small group of users the
ability to run 10 or so commands in the normal manner, but also be able to
run ALL commands, but only with timestamp_timeout=0 and a different
passprompt for those commands.

The purpose of this is to give application administrators that I trust the
ability to do their normal job without hassle, but if they get into an
emergency and need to do sysadmin work, that they can, albeit with
additional reminders in place to be responsible and careful.

The only way I can think of doing it currently is to have two sudo
commands, the second one calling a different sudoers file.  Obviously,
that's a less maintainable option so it's not my preference.

thanks!
Note: please CC responses to my home email address to increase my chance
of seeing them.


More information about the sudo-users mailing list