| Author |
Message |
|
HFTobeason
Joined: Nov 07, 2003 Posts: 200
|
 Force a remote reboot?
My remote Mac Mini, running Indigo Server, is misbehaving, and I'd like to reboot it. I do not have SSH access. I do have Indigo Client access to the server, however. I've tried using Indigo Client to create an action with an embedded Applescript fragment to force a restart (tell application "System Events" to restart), but it's not having any effect. Any ideas much appreciated. Thanks.
|
| Wed Nov 09, 2011 10:16 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6665 Location: Austin, Texas
|
 Re: Force a remote reboot?
You might try telling the Finder to restart instead. System Events is unpredictable in the best of times.
_________________ Jay (Indigo Support)
|
| Wed Nov 09, 2011 11:09 am |
|
 |
|
HFTobeason
Joined: Nov 07, 2003 Posts: 200
|
 Re: Force a remote reboot?
Thanks for the reply. Sadly, no effect.
|
| Wed Nov 09, 2011 11:13 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6665 Location: Austin, Texas
|
 Re: Force a remote reboot?
Sounds like your Mac is well and throughly hosed at the moment. There's probably some App running that's canceling the restart because it's hung up...  The only two things I can think of to fix that require either VNC (Screen Sharing) or ssh access.
_________________ Jay (Indigo Support)
|
| Wed Nov 09, 2011 11:45 am |
|
 |
|
HFTobeason
Joined: Nov 07, 2003 Posts: 200
|
 Re: Force a remote reboot?
Thanks, Jay. Yeah, I think I'm hosed, too. VNC and SSH not options. Gonna have to get physical access...
|
| Wed Nov 09, 2011 12:01 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6665 Location: Austin, Texas
|
 Re: Force a remote reboot?
Have you ever checked in to one of the VNC redirector services? I use iTeleport from my iOS devices to get back to my Macs here at home without opening any firewalls (also have MobileMe/iCloud Back to My Mac access as well from other Macs outside my house). Like Prism for VNC...
_________________ Jay (Indigo Support)
|
| Wed Nov 09, 2011 12:20 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11698 Location: Texas
|
 Re: Force a remote reboot?
This may not work because of permission problems, but try: - Code: Select all
do shell script "shutdown -r now"
If that doesn't work then there might be some way to use 'sudo' and pass in your username/password to the shell script but I'm not sure of the exact format.
_________________
|
| Wed Nov 09, 2011 12:28 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11698 Location: Texas
|
 Re: Force a remote reboot?
This might work to pass in your password: - Code: Select all
do shell script "echo PASSWORD_HERE | sudo -S shutdown -r now"
Substitutde PASSWORD_HERE with your OS X admin account password. Do NOT put it in quotes.
_________________
|
| Wed Nov 09, 2011 12:59 pm |
|
 |
|
HFTobeason
Joined: Nov 07, 2003 Posts: 200
|
 Re: Force a remote reboot?
This seems to have worked: - Code: Select all
do shell script "shutdown -r now" user name "USERNAME" password "PASSWORD" with administrator privileges
|
| Wed Nov 09, 2011 1:13 pm |
|
 |
|
mrdubs
Joined: Nov 22, 2011 Posts: 10
|
 Re: Force a remote reboot?
HFTobeason wrote:This seems to have worked: - Code: Select all
do shell script "shutdown -r now" user name "USERNAME" password "PASSWORD" with administrator privileges
Is this working for you in 10.7+? It's returning "username" variable not defined (-2753) when I try this in 10.7.2. I've removed the quotes in the actual code for UN and PW. I've also not tried this before in earlier versions of OSX.
|
| Fri Dec 02, 2011 8:30 am |
|
 |
|
HFTobeason
Joined: Nov 07, 2003 Posts: 200
|
 Re: Force a remote reboot?
@mrdubs - yes, it does work for me. For example, assuming your username is mrdubs and your password is mrdubspassword: - Code: Select all
do shell script "shutdown -r now" user name "mrdubs" password "mrdubspassword" with administrator privileges
Leave the quotes just as above.
|
| Fri Dec 02, 2011 8:37 am |
|
 |
|
mrdubs
Joined: Nov 22, 2011 Posts: 10
|
 Re: Force a remote reboot?
HFTobeason wrote:@mrdubs - yes, it does work for me. For example, assuming your username is mrdubs and your password is mrdubspassword: - Code: Select all
do shell script "shutdown -r now" user name "mrdubs" password "mrdubspassword" with administrator privileges
Leave the quotes just as above.
Thanks for the rapid response! I will give this slight revision a shot later today.
|
| Fri Dec 02, 2011 9:00 am |
|
 |
|
mrdubs
Joined: Nov 22, 2011 Posts: 10
|
 Re: Force a remote reboot?
mrdubs wrote:HFTobeason wrote:@mrdubs - yes, it does work for me. For example, assuming your username is mrdubs and your password is mrdubspassword: - Code: Select all
do shell script "shutdown -r now" user name "mrdubs" password "mrdubspassword" with administrator privileges
Leave the quotes just as above.
Thanks for the rapid response! I will give this slight revision a shot later today.
Worked perfectly! Thanks so much.
|
| Mon Dec 05, 2011 12:12 pm |
|
|