There is a Network.WakeOnLan method in REALbasic.
Charles Yeomans
On Dec 18, 2006, at 7:51 PM, Fargo Holiday wrote:
I feel I should point out that, even without an interface, you
could expose security vulnerabilities. For instance, if you use the
echo <password>|sudo -S method, it usually displays the password
that was echoed when you look at the processes, say via ps. This is
sort of a bad thing, since any application or person could,
conceptually, run ps and immediately have the user's password. So,
the concern isn't about what can be done to your application, but
rather what can be done to the system because of the application.
You can't, so far as I know, really cause a script to logout then
back in as a different user. You could have cron use different
versions of the script that just run as different users, or you can
call su - <username> from the script, though that would entail
using interactive passwords, since I don't think su will read
passwords from stdin.
As for Wake on LAN, you might look at the tools listed here:
https://webserver.brandeis.edu/pages/view/Bio/MacOSXWakeOnLAN
One of them may lead you to a way to form a proper WOL packet,
otherwise you could try tracking down the network standard for it,
should one exist.
Good luck,
Fargo
Craig Hoyt wrote:
Thanks Sam, Kem, and Fargo,
I'll give this a wack. I tried to find the answer myself so I
might have got myself screwed up some with the 'using
administrators permissions' thing - I think this is an AppleScript
thing and not Shell script.
As for security... this is not an issue. My little slave programs
have no interface so it can not be tampered with. It's only
function is listen on a particular port for specific UDP commands.
Commands can only be sent from the master program which am in
control of. I'm the administrator of a 24 Mac Lab. This is just to
streamline my job. I already can do some real cool stuff... Shut
Down & Restart is a given, but I can do a Repair Disk Permissions,
move all desktop items to the trash, empty the trash, close all
Finder windows, run/quit applications, open a specified browser to
a specified URL, sleep, wake, open/ close CD/DVD drawers, and a
bunch more. I can select a singe Mac or send to all (it's real
funny sending an open and close drawer commands to all - except
for our newer Mac the drawers open and close in unison - kind of
like the scene from No Time For Sergeants except computers and not
toilets). I'm still working on a way to logout from one account
and into another using a Shell Script and implementing a 'Wake On
Lan'.
Have an Egg Nog on me... Actually have mine I hate the stuff!
Craig
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>