We’re predominately a Windows shop and in the process of binding our (10.9 only) Macs to AD. At the moment our clients mount the SMBHome contained within the homeDirectory attribute on AD as expected, at /home/username.
However, what I'd like to do is have clients take this attribute but add a suffix so the path:
smb://share/staff/firstletterofusername/username/MacOSX
....gets mounted, as opposed to:
smb://share/staff/firstletterofusername/username
which is used by our Windows clients.
It looks as though the clients are populating their own NFSHomeDirectory attribute (which points to /home/username) which is fine, but I suppose I would prefer the local mount point to be /Users. I’m guessing I can get our AD team to add and populate that attribute on our servers.
The only idea I’ve had so far is to write a script for the JSS that runs at user login time which does the following:
- Get the username
- Retrieve the user's SMBHome value and convert to forward slashes
- Add the user to the /etc/sudoers file so the local mount point (at /Users) can be created if not present already
- Issue the mount command
- Remove user from /etc/sudoers file
But I can’t help thinking there’s a better way of doing this. Scripting is not really my strong point, yet. I know that scripts in the JSS run as root, so the main problem is a normal user being able to create a directory under /Users. And then I wonder about that user having the right permissions to write stuff to the SMB share.
Can anybody suggest a better way of doing this?
Any advice most welcome!