Jump to content

Run Shell Script BEFORE logon


Recommended Posts

Posted

A LoginHook will do that (You'll want to use the 'Mac OS X 10.3, 10.4, or later' method. Trust me, it's easier!).

It will run the script you specify as the very first action as a user logs in, allowing you to set up the computer before anything user-related is configured.

Apparently you can set login scripts using Workgroup Manager, but I've had no success with it, and I believe it is very hard to get it working.

 

Bombich.com also has some content on LoginHooks I found useful.

Posted

Yeah I've seen this but a loginhook runs AT login, not BEFORE login which is what I need. I need a script that will unbind the machine from AD and then rebind to AD as the computer starts (pref before it shows the login prompt).

 

Any other ideas?

Thanks

Posted

You need to use a StartupItem. These will run the script on system startup.

 

You need to place the executable shell script in a folder placed in /Library/StartupItems. The filename of the script MUST be the same as the folder. You then need to include a plist, name StartupParameters.plist.

 

Not exactly sure on the contents of the plist, there startup item I use was written by somebody else. But this thread will explain the startup item I use and the process of creating it...

 

http://www.edugeek.net/forums/mac/43879-snow-leopard-ad-integration-woes.html

 

Check out the first post by Ephelyon.

 

There are a few resources on startupitems on google as well :)

  • 3 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...