Click to See Complete Forum and Search --> : Reboot as user


HTS
10-24-2004, 07:43 AM
Hi ,

I am trying to reboot my Linux (Red-Hat 7.0 embedded ).
The OS is logging automatically with root.

I need to log from a different computer (using telnet) and to play a script that cause to reboot.
The problem is that I log as user and the script doesn't recognize one of the reboot commands:
shutdown -r now, init 6, reboot....

Can I give the user permission to reboot? How can I do that?
Is there any other way to cause a reboot?

thanx, HTS.

Uranus
10-24-2004, 08:00 AM
Use sudo and /sbin/reboot - by default users don't have /sbin in their path, which is why it doesn't recognize your command.
Sam

HTS
10-24-2004, 08:29 AM
My embedded system (which is less than 128 MB) doesn't know sudo.
What can I do?

Choozo
10-24-2004, 08:41 AM
chmod +s /sbin/reboot (or /sbin/halt if reboot are symlinked to halt) should do it?

Uranus
10-24-2004, 10:36 AM
Install sudo. Try Choozo's idea - sounds good.
Sam

HTS
10-24-2004, 11:11 AM
Choozo, I did it. It works !!!!!
thanx u all.
HTS

Choozo
10-24-2004, 12:54 PM
Glad to hear it worked out :)