mbrunt Posted September 14, 2010 Posted September 14, 2010 Hi all, Anyone know how to run a shell script BEFORE a user logs on? Cheers, Martin
dayzd Posted September 14, 2010 Posted September 14, 2010 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.
mbrunt Posted September 14, 2010 Author Posted September 14, 2010 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
dayzd Posted September 14, 2010 Posted September 14, 2010 Uhrm... You might get a LaunchAgent to do that, but I've never used one. Some Launchd Recipes | mac geekery might get you started.
saplinpoo Posted September 14, 2010 Posted September 14, 2010 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
Redlance305 Posted April 29, 2014 Posted April 29, 2014 This seems to run after the user logs in, we are still having the 'woe'. Any newer solutions?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now