0

I want to run a couple of .sh scripts when the user first login after user creation to set the correct settings. I know there is a folder (/Library/StartupItems) that let you place script for running on every startup, but is there something like that for first time logon?

2

I don't know of a specific place on OS X, but a pretty common way to handle this is just to have the script run every time the user logs in, and check for the presence of a specific hidden file in the user's home directory. If the hidden file is there, do nothing and exit. If it's not there, run the first-time login procedure, and create the hidden file.

Note also the "/System/Library/User Template/[locale]" directory, which is the skeleton home directory used to create all new users' home directories. You may be able to use this to achieve what you want.

Have a look at: Modifying OS X User Template

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .