arethinn: glowing green spiral (Default)
I need a tool/application/doo-hickey that will allow me to remotely shut down a Mac (probably 10.4 by the time I need to do this, but possibly 10.3.x), more precisely a bunch of Macs, over a network. It needs to have the following capabilities or options:

1. Allow me to specify how long after the program is run the computer will shut down. I prefer being able to specify a clock time, but # of seconds is ok too. It must be manually invoked -- not something that is only capable of being pre-scheduled.

2. Be able to be run from the equivalent of a batch file (whatever that means in the Mac world -- I don't know anything about operating from the OS X command line, only a Windows one, but I can learn). Having to click something per station is not satisfactory, as I could potentially need to shut down up to 90 computers with this thing.

3. Pop up a box for the user so they can see the countdown, and allow me to configure a message in that box.

4. Not be closeable or cancelable by the average user (I don't expect protection against specialized knowledge of killing processes or whatnot).

5. Be configurable to not offer the option to save changes on any open files, i.e., to simply pull the rug out from under the user if that's what I desire.

6. A configurable timeout would be a huge bonus. The network is extremely squirrely (fur in the cables and everything; you have no idea) and I don't want to have a station be skipped just because the program didn't wait long enough, or conversely, to spend too much time trying to connect to one in the middle of a row that is already off (which Shouldn't Happen, but sometimes does anyway).

The current setup (for PCs exclusively) is that I run psshutdown.exe by executing one batch file per row of 10, which has proven to be the most practical way to do it. Right now we only have 6 Macs, which are rarely used, so I've been ignoring the very-occasional case of someone still using one at closing time. Sometime within the next year, however, we are going to have a room full of dual-booting iMacs. While the practical likelihood is that they will mostly be booted to Windows (thus, psshutdown will still work, I hope), I won't have any control over which are in what OS state when, so I'll have to alter said batch files on the fly every night so that the correct program is attempting to run on a given station (unless someone knows of a program, preferably for Windows although it would be doable to have me log into one of said Macs to run it, that will remotely shut down either/or!).

I imagine something like this exists, I just don't know where to go looking for it. Halp plz!

Date: Jun. 27th, 2007 03:04 am (UTC)From: [identity profile] starlightforest.livejournal.com
"You would have to ssh into the machine to execute the command."

To the individual stations, you mean? (I definitely can't ssh to the server.) One at a time? Or by "script" are you saying I can construct something which will automate the process and do the work of logging in to each individual machine, issuing this command, and then moving on to the next one.

On the mac side, go to Preferences-->Sharing-->Remote Login and start this service. If you don't do this, you won't be able to ssh to your mac.

This doesn't sound good. I definitely don't want J Random User to be able to ssh into the station, and the student login doesn't have a password (yes yes, I know, but I am not the sysadmin, and even if they did have a password, all the students would, obviously, have to know it).

Date: Jun. 27th, 2007 04:02 am (UTC)From: [identity profile] rhiannasilel.livejournal.com
Do you shut these down at a specific time each evening? If so, you may be able to schedule what is known as a cron job to do the work for you or, and this looks even easier, you can create a periodic job. Basically, write a script and then schedule it. Periodic jobs are easier, because you just write the script and put it in the /etc/periodic/daily folder. Here's a good link describing both possible functions:

http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/Daemons.html

...and ACK! No password for the student login? There's a scary thought for you. Of course depending on how tight your IT department locks down that user they may not be able to do much, anyway, unless they can find the root password, which, hey, it's a college so I'm sure there are a few people there who could find it. One nice thing about Macs is you can actually lock down user access a bit more than you can on a Windows machine -- or should I say a bit more effectively.

As for ssh you might be able to restrict ssh capability to specific users. That's something you'd have to ask someone with a bit more security knowledge than I have. If this was the case, that would be one option, but yeah, you'd have to go into each one on some level or another or you could write a script that calls a list of servers, ssh's to them, prompts for the password and then executes a specific command. We had something like that at SunRocket on our Linux machines, but the logic should work on a Mac. But, again, this would involve using ssh.

Date: Jun. 27th, 2007 05:56 am (UTC)From: [personal profile] michiexile
michiexile: (Default)
Setup right you can make sure that ssh from one specific machine won't prompt for passwords (keywords: ssh-agent and public key authentication). With that in place you can write a script that runs from one machine, logs on to all others and runs shutdown there, possibly with a dialog popping up as well.

When ssh is setup, you want to restrict login to only the user that shuts it down - which probably would be root or admin or something.

Date: Jun. 27th, 2007 06:41 am (UTC)From: [identity profile] starlightforest.livejournal.com
This sounds like needing way more control than I have over these machines. Again, I am not the sysadmin. I can request that I be given appropriate permissions to shut down a machine (as I was for the Windows command), but I can't make any such thing happen myself.

Date: Jun. 27th, 2007 06:43 am (UTC)From: [identity profile] starlightforest.livejournal.com
Do you shut these down at a specific time each evening?

Yes, except it's different on Fridays, and as I said, it really needs to be something manually executed because it's not always the same things that need shutting down. (As it sits now it's just a row-by-row difference; in the new situation, it will be a station-by-station difference.)

All of what you are suggesting/describing sounds like requiring way more access and/or control (...over the IT dept) than I actually have, or can hope to have. Oh well. TY anyway.



Profile

arethinn: glowing green spiral (Default)
Arethinn

July 2025

S M T W T F S
  12345
6789101112
13141516171819
20 2122232425 26
2728293031  

Expand Cut Tags

No cut tags

Style Credit

Page generated Jan. 19th, 2026 12:58 pm
Powered by Dreamwidth Studios