Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Tom Veitch on November 18, 2002, 04:06:08 AM
-
Can any one help
i want to send a shutdown command to a SME server from a windows 2000 server that has ups software running.
eg Win 2000 ups software has found that the power is out and i have it run a batch file before shutting down the batch file will tell the SME box to shut down.
Regards
Tom
-
You're in luck ... I asked a very similar question not long ago and was rewarded with some very interesting ways to do just what you're asking.
http://forums.contribs.org/index.php?topic=15439.msg59327#msg59327
-
One potential stopper: I finally got around to actually using this (wish I'd tried it sooner) and it turns out that if you create another user, that user has to have superuser power. At least at my level of knowledge. I'd welcome additional input!
-
Just "adduser -r", I think that grants system rights. If not you could usermod to change group memberships...
Hope this helped,
Nathan
-
usermod -G root I think accomplishes what you want...
Hope this helped,
Nathan
-
thankyou all for your help
the answer was in the
c:\plink -l root -pw password 192.168.1.1 /sbin/shutdown -h now
Regards
Tom
-
It works all right, but as was pointed out to me in the initial thread, this exposes your root password in plaintext if you put it in a batch file. This is a serious security breach!
-
Yes i agree,
so to setup a shutdown user is a good idea
Once again Thanks
Regards
Tom