Posted on 11-22-2011 08:40 AM
Hey list, I'm having trouble finding info on this with google . . . .I'd like to customize active directory user's docks with their documents directory. I tried adding a documents dock element to casper, but that just tries to add MY documents directory to everyone's dock. Is this possible with casper?
Thanks
nick
--
Nick Kalister
Desktop Engineering
Hitachi Data Systems
Office: 408.970.4316
750 Central Expressway
Building 32 : M/S 3240
Santa Clara, CA 95050
Posted on 11-22-2011 09:59 AM
You might not like my answer, but my answer is it's not really worth you're time in my opinion. There is a reason we don't do it here with AD.
Because the AD path to their home share is unique to that user you'd have to do some sort of login triggered event to first find out what the logged in username was and then somehow modify the dock plist file with that. Fortunately with login hooks you can snag the logged in user easily with $3 I believe. It grabs yours because your documents folder path is what is in that dock item and the plist.
Then you'd have to modify the com.apple.dock.plist file properly in that users Preferences directory and relaunch finder I would imagine to get it to appear on the dock.
In other words, it's not pretty from what I understand would need to be done. I'd help more, but I'm trying to soak in some vacation this week for once. =D
Maybe I'm wrong.
Craig E
Posted on 11-23-2011 03:27 AM
If you want the users home directory, it's pretty easy. You don't need to be trawling AD, directory services or anything like that, just run a printenv as the user.
Below are two examples, one for a local account the other for a network account. User called 'test' that is local and user called 'mosx' that is a network home account. Same simple command if it is a login hook:
su $3 -c printenv | grep HOME | cut -d "=" -f 2
Examples:
root# su test -c printenv | grep HOME | cut -d "=" -f 2
/Users/test
root# su mosx -c printenv | grep HOME | cut -d "=" -f 2
/net/homes/mosx
Sean
Posted on 01-11-2012 02:14 PM
thanks, Sean, that's an interesting bit of info- if I end up using that in a script, I'll post it.
Posted on 01-12-2012 04:29 AM
Hi guys,
I have used the log in script in the resource kit and $3 didn't really work out for me. I cannot map all the way to each username. For example, if the share is
smb://File_Server/Share_Folder/Username, the script can only take me to the Share_Folder and I end up seeing all the other users' folders. Has anyone had similar problem?