box_l Posted December 8, 2009 Posted December 8, 2009 for Ubuntu,prefix everything in the shell with sudo. then enter your password. BoX
box_l Posted December 8, 2009 Posted December 8, 2009 ** Thread hijack alert ** Sorry about the hijack but how can I shut down a nix box remotely from a Windows system with say, a batch file? Is this possible? HBJB Not shutdown, but i expect you can edit it. Create a file /opt/ltsp-4.2/i386/sbin/rebootself that contains the lines: #!/bin/sh exec /sbin/reboot and in /opt/ltsp-4.2/i386/etc/passwd, add: reboot::0:0:root:/root:/sbin/rebootself Now do "ssh reboot@machine" to reboot it without a password. found on DNA Lounge: Source Code: Diskless Linux Kiosks I Hope this helps BoX
powdarrmonkey Posted December 8, 2009 Posted December 8, 2009 for Ubuntu,prefix everything in the shell with sudo. then enter your password. BoX Er, no. Only when you want to execute something requiring privileges, and then you should drop them as soon as possible.
powdarrmonkey Posted December 8, 2009 Posted December 8, 2009 Now do "ssh reboot@machine" to reboot it without a password. This is a really stupid idea. 1
box_l Posted December 9, 2009 Posted December 9, 2009 Er, no. Only when you want to execute something requiring privileges, and then you should drop them as soon as possible. Sorry, I thought that people would realise that they would not need the password if they were not presented with a prompt for one. BoX
box_l Posted December 9, 2009 Posted December 9, 2009 This is a really stupid idea. Which is why I said "I hope this helps", I did NOT say it was a good idea. I also said Not shutdown, but i expect you can edit it. EDIT being the operative word. The poster HBJB asked if it "could" be done and I found an answer. All that would need to be done would be to set a strong password for the user on the remote machine and it would not be "stupid" anymore, but thanks for your constrictive criticism. Maybe I am not expansive enough in my posts, not actually giving full explanations for everthing I say. BoX
ahuxham Posted December 9, 2009 Posted December 9, 2009 Which is why I said "I hope this helps", I did NOT say it was a good idea. I also said EDIT being the operative word. The poster HBJB asked if it "could" be done and I found an answer. All that would need to be done would be to set a strong password for the user on the remote machine and it would not be "stupid" anymore, but thanks for your constrictive criticism. Maybe I am not expansive enough in my posts, not actually giving full explanations for everthing I say. BoX Nah you're post was spot on, you showed a method how it can be done, obviously its upto the person taking the advice to be sensible about it. No need to explain, everyone's got opinions, just leave it at that, its what I do at least 1
powdarrmonkey Posted December 9, 2009 Posted December 9, 2009 The poster HBJB asked if it "could" be done and I found an answer. All that would need to be done would be to set a strong password for the user on the remote machine and it would not be "stupid" anymore, but thanks for your constrictive criticism. As a technical solution, its fulfils the brief perfectly, yes. But unfortunately, many people Googling for something similar will read it as "this person clearly knows things, this must be the right answer" - without really understanding what they're opening themselves up to. I call this 'but-the-internet-told-me-to'. Of course you could argue that people stupid enough to blindly follow instructions deserve to get their servers DOSsed by teenagers who should be in lessons. But we all had to start understanding somewhere. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now