Hi,
You can shutdown by a user, by building a special program for that purpose.
This program will use the 'setuid' command with userid root, and the
shutdown
command with it's flags can be hard coded, or get the flags as parameters.
1. Compile the following code as 'root':
main{}
{
On Sat, 22 Jul 2000, Vadim Vygonets wrote:
Or you can take the BSD approach:
1. Add users allowed to shutdown to some group (call it
"operator").
2. Make shutdown owned by user root, group operator:
# chown root.operator /sbin/shutdown
3. Make shutdown runnable only by operator,
On Sat, 22 Jul 2000, netvision wrote:
You can shutdown by a user, by building a special program for that purpose.
This program will use the 'setuid' command with userid root, and the
shutdown
command with it's flags can be hard coded, or get the flags as parameters.
the way you describe
Quoth guy keren on Sat, Jul 22, 2000:
On Sat, 22 Jul 2000, Vadim Vygonets wrote:
Or you can take the BSD approach:
1. Add users allowed to shutdown to some group (call it
"operator").
2. Make shutdown owned by user root, group operator:
# chown root.operator /sbin/shutdown