regisdaniel
asked on
Turning Linux Server Off remotely
Hi experts.
My company purchased a nobreak that have the ability to turn off the computer when the batery charge gets critical. This job is done using the Nobreak's software (Upsilon 2000), that is installed on Windows server.
My enviroment have 6 servers: 1 Windows 2003 Server and 5 SuSE Linux Enterprise Server.
The Nobreak's software have the ability to call an application when it starts the shutdown sequence. So, my ideia is to develop an small aplication that will connect to the Linux Serves and inform them to start a shutdown operation but I have no ideia of how this could be implemented on my Linux servers...
Does anybody have any advice?
Thanks a lot.
My company purchased a nobreak that have the ability to turn off the computer when the batery charge gets critical. This job is done using the Nobreak's software (Upsilon 2000), that is installed on Windows server.
My enviroment have 6 servers: 1 Windows 2003 Server and 5 SuSE Linux Enterprise Server.
The Nobreak's software have the ability to call an application when it starts the shutdown sequence. So, my ideia is to develop an small aplication that will connect to the Linux Serves and inform them to start a shutdown operation but I have no ideia of how this could be implemented on my Linux servers...
Does anybody have any advice?
Thanks a lot.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>
Ooops sorry the line above must read:
Now edit /home/rmtsht/.bash_profile
if you want t further restrict this user to run only this script.
- change to user home directory.
- create a shell file called rmtsh and add these lines in it:
#! /bin/sh
sudo /sbin/shut.sh
- Save and exit
- chmod 500 rmtsh
- if you created the file as root issue this command too:
chown rmtsht.shutdown rmtsh
- issue this comand as root:
chsh rmtsht
- after the
New shell [/bin/bash]:
prompt enter the new shell as :
/home/rmtsht/rmtsh
- Ignore the warning - Observe the
Shell changed
message
if you want you can also
chmod 750 /home/rmtsh
so that only rmtsh and users in shutdown group (read-only) could see the ccontent of this directory.