Operating System - HP-UX
1851252 Members
2948 Online
104057 Solutions
New Discussion

Re: Reboot for a normal user.

 
SOLVED
Go to solution
Manuel Plaza
Regular Advisor

Reboot for a normal user.

Hi,

Can a normal user run command reboot without to use sudo or other similar tool? I want run the command reboot, and not "shutdown -r".

Thanks and regards,

Manuel
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: Reboot for a normal user.

Manuel,

First, no, a normal user cannot run reboot. There is no "allow" facility as there is for shutdown.

Second, this sounds rather dangerous to me. Reboot, does not go through the normal shutdown script process, does not shutdown databases or terminate other services - it just halts the system, quick and dirty. This is not something that should be done on a normal basis. I would think you would want to put the user into a /etc/shutdown.allow file and allow them to issue a nice, normal, safe shutdown command.


Pete


Pete
T G Manikandan
Honored Contributor

Re: Reboot for a normal user.

Only a shutdown is possible for the normal user will his name in the /etc/shutdown.allow.
Darren Prior
Honored Contributor

Re: Reboot for a normal user.

Hi Manuel,

Reboot cannot be run by normal users - this is a safety/security feature. Shutdown can be run by non-root users; see the man page for info on the shutdown.allow file. Please reconsider your use of reboot - it's not the nicest way to achieve your aim. Compare the man pages of reboot(1m) and shutdown(1m) to see the benefits of using shutdown.

regards,

Darren.
Calm down. It's only ones and zeros...
Robert-Jan Goossens
Honored Contributor

Re: Reboot for a normal user.

Hi,

I agree with Pete on the fact that a normal user should not be able to use the shutdown command, but it is possible. Take a look at the man page for shutdown and specific to the file /etc/shutdown.allow.

# man 1m shutdown

Hope it helps,

Robert-Jan
harry d brown jr
Honored Contributor

Re: Reboot for a normal user.

I agree with Pete & others, and I would like to add that HPux is NOT windoze - it doesn't require weekly/daily/hourly reboots. You should have a serious reason to shutdown or reboot a system, and the last person you want doing that is someone who does not know what they are doing - which usually equates to someone who isn't allowed root priviledges for a reason (they know not what they do).

live free or die
harry
Live Free or Die