cancel
Showing results for 
Search instead for 
Did you mean: 

reboot

vladimir gershman
Occasional Advisor

reboot

Hello,

How does one allow a user to issue /etc/reboot? Is there such a thing as reboot.allow?

Thanks,

Vlad
11 REPLIES
Mark Greene_1
Honored Contributor

Re: reboot

Download and install sudo:

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.6/

You can then give root-equivalent access on an individual command basis to specific users. Plus all their activity is logged, so if they are abusing the priviledge, you will know about it.

HTH
mark
the future will be a lot like now, only later
S.K. Chan
Honored Contributor

Re: reboot

No (as far as I know) ..
You can use the shutdown command instead with the "-r" (reboot) option.
# shutdown -r 0
Create the /etc/shutdown.allow file and the format is ..
systemname username
Check ..
# man 1m shutdown
for details.
harry d brown jr
Honored Contributor

Re: reboot

1) Unless you know what and why you are rebooting, then DO NOT USE /etc/reboot!

2) Use /etc/shutdown.allow to authorize shutdowns and rebooting for NON-root users!

Do a man on shutdown:

man 1m shutdown


live free or die
harry
Live Free or Die
Hai Nguyen_1
Honored Contributor

Re: reboot

Vlad,

You can use "sam -r" to allow a non-root user to reboot. man sam for more details.

Hai
vladimir gershman
Occasional Advisor

Re: reboot

Actually, I wanted to know if I can do this without sudo. I know I can allow certain users to do "shutdown" using shutdown.allow file, but is there such thing as reboot.allow?

thanks
Hai Nguyen_1
Honored Contributor

Re: reboot

Vlad,

There is no such file.

Hai
Paul Sperry
Honored Contributor

Re: reboot

Dude

reboot is the worst command you can use!!!

Stick with shutdown -r

NEVER use reboot unless your looking for trouble ;)
harry d brown jr
Honored Contributor

Re: reboot

If you allow a use to use /etc/reboot, you might as well just let them kill -9 0.

Again, I can't stress enough how important it is to use shutdown over /etc/reboot!

And hopefully you have a make_tape_recovery available if you want to continue using reboot.

live free or die
harry
Live Free or Die
Helen French
Honored Contributor

Re: reboot

Some points:
1) There is no such file to allow or deny access to reboot command.
2) Since reboot will not take a proper "reboot" of the system with shutting down all processes and applications, stick with shutdown -r command which will shutdown all applications properly and then do a reboot. Reboot will immediately reset the system. The advantage is you can configure your users in shutdown.allow file.
3) By default only root will be allowed to execute the command reboot.
Life is a promise, fulfill it!
Kelli Ward
Trusted Contributor

Re: reboot

Hi,
Don't let your users reboot. (I.e. sudo)
shutdown.allow and
shutdown -y -h now or:
shutdown -y -r now

will allow a user to gracefully shutdown a system without waiting the 60 seconds or sending a message if your worried about time.

If other users are logged on they might be upset if they don't have time to log off, but it is do able and is only a number of seconds longer than (and much safer than) reboot without the -q option.

HTH,
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
vladimir gershman
Occasional Advisor

Re: reboot

Got my answer. Thank you all.