Mac Login Script
We've integrated our 15 new shiny macs into AD using the 3rd party ADmitMac solution which is working well.
However, I need to implement a Login Script to copy some files for users when they login. I have read how to add a Login Script using Workgroup Manager but I don't know what format my script should be in. Workgroup Manager doesn't let me select a .sh script file as a Login Script.
Anyone have any ideas?
You could try a bash script and changing the extension to ".hook" without the quotes. You need to make sure that you make it executable too.
There are some issues with login hooks in Leopard that I have seen floating around, and some solutions suggest copying the script to the local machine and having it start up from there rather than be assigned through WGM. I have to admit that I avoid login hooks like the plague :o
There is an excellent Apple KB article that you can look at to:
Scarily there are also people who use launchd agent configuration files! Yikes!!
Free Mac Support Leopard Workgroup Manager - Can’t Select Login / Logout Scripts
I Googled for the same thing, and ended up here. I eventually found that you must have no extension on the login script, and you must set the executable bit on the file:
Hope that helps :)
chmod +x /loginhook