Hello,
I tried creating an mcx setting that adds a login item to ~/Library/ loginwindow.plist This did not turn out so well and I was wondering if anyone has had to find a solution for this before:
I need to mount a windows server share (smb) at user login
It needs to prompt for the user's credentials and hopefully being able
to use keychain to store them.
I don't want to write a script that codes the username and password
I cannot bind these machines yet to Active Directory as they need
Kerberos from thier Open Directory for the time being. (that would
have been too easy!)
What I was doing that failed is to copy an .afploc file to ~/Library/ Recent Servers/ and add that link to the Login Items (loginwindow.plist) via mcx. I could get this to work great if I manually edited the loginwindow.plist file, however pushing it via MCX seems to mess the file up and remove the other entries in that file a user may already have.
I guess I could just copy the file to the user's profile and write a quick script like the one below and create a launch agent to run it:
#!/bin/bash
# Mount a share at user login
open ~/Library/Recent Servers/whatever.afploc;
exit 0
Any thoughts?
Thanks,
Ken
