Quote Originally Posted by coalis View Post

I am working through the same exact issue that you had a couple years ago. We want to have our configured local profile apply to the Kanaka login like our local users get. It seems that the Kanaka MCX settings are coming from somewhere on the server but we have been unable to locate them and can find no documentation on the client or server side that points to where these MCX settings are. Your description is eerily word for word what we have done and in the years since you asked these questions there doesn't seem to be any better documentation as to how it all works nor any answers to similar questions others have posed.

Did you ever get a response in your search or did you figure out where the Kanaka MCX profile lives?

I hit this problem some time back, I finally gave up on trying to get Kanaka to do the job for me. I let the Plugin log the user in to their account, and mount their drives, and create a local account on the Mac. Then I have a LaunchAgent run. The LaunchAgent runs a Bash script. The script does all of the work for me, and it does exactly what I want.

You can pre-configure your templates with Preferences, by running a one time script. loads of "defaults write" commands pointed to the templates. New users will then have their accounts built with these settings pre-configured. It doesn't seem to matter that in reality the account would not normally have these settings in place until after the user has logged in, if the preference setting is there it will be used. I use a for do done loop to run through all of the templates. You can also then do the same for any existing users.

Then I run a LaunchAgent, these execute when a user logs in. Any script that the Agent runs will run as the User. The script runs through the users account and swaps out the folders you are looking at, with a sym link to the users Network home version. The only problem you will find with this approach is, the user does not have the rights to delete these folders. So I use a LaunchDaemon watching a watched file to do the work, LaunchDaemons run as root.

Agent Script runs
Finds a local Desktop folder
Touches the watched file, and pauses
Daemon Script runs
Deletes the required file, and ends
Agent Script resumes
Creates a sym link to the network folder
Repeat this sequence to sort out all of the other folders.

Then your script can do anything you want to do as the logged in user.

I have a hidden file that the script puts in the users Local home folder, I check for this file, if it is found then the script misses out all of the above work. This reduces the time for the script to run. All of that stuff needs to be done once per user per computer, unless you do a change that you want it to run again - then it is a simple matter of deleting the hidden file.

Be careful with re-directing the Movies and Music folders. We run video editing and music making software, and the ones we have require to use local files only. I put a sym link to their network folder inside of these two folders, easy access but there is still a local folder.
The Users Library is kept Local, apart from Safari Bookmarks which are in the Users Network Home. If an account hits a major problem, you can wipe the contents of their Library and the hidden file, and your scripts will run and reset everything back to how you want it to run.