SOLVED Wake on lan/force shutdown
I support various training centres who like to
- Switch all the computers on in the morning and
- Switch them off again at the end of the day.
The group of computers would be all the non-admin computers so it would be ok for them to be forced shutdown.
I think I could do this without fog by the following:-
maintain a list of mac addresses and IPs for the groups of PCs
php web page calls scripts:-
[*](switch on) To send a wol packet to each mac address
* To send a net rpc SHUTDOWN message to each IP
However, it seems that most of this is already built into Fog… I can immediately see that I’d need to use a different authentication schema at first, because these tutors don’t need any functionality related to imaging. So I would just have a basic authentication restriction via htaccess, and then write a page that will allow:
Firstly the user to select the group name
Two buttons one to switch on and the other to force switch off all computers in that group.
If possible this would be restricted to groups that begin with a prefix of some sort so that I could restrict which groups are shown in the list and therefore that are permitted to be switched on and shut down in that way.
Would this be useful to anyone else?
Can anyone tell me some tips on how to achieve this?
What are the key components I’d have to understand? I have a good general knowledge of programming and Linux
What would be the hardest part of this do you think?
[*]Would it actually be practical to create a new type of user, and add sections to the Fog gui for their use?
If you have the FOG Client installed on the workstations, you can specify sleep/shutdown times.
I tried it but it wasn’t very reliable with my windows XP boxen. I just found that the snap-in did not respond quickly enough, or at all in some cases. I am soon going to be installing zentyal with samba4 at which point I will probably open the firewall and look at running psexec or something like that and see if I can’t find a workaround somehow.
Thanks for the tip.
Just a thought, if you create a group in FOG and move all the PC’s you want into it. Then you could make a batch file with “shutdown /s /f /t 0” and save it as shutdown.cmd. Then you can upload that file as a snap-in to fog. Lastly, if you shut the computers down at a certain time at night everyday, you should be able to set the schedule the file to run using the Cron execution through FOG. Just a thought, i’ve never tried it, so I don’t know the results.
To be honest I’m only looking for a few tips so that I can start nosing around and trying to put together a frankenmod here rather than looking for a feature- although it would be really nice…