Posted on 12-02-2014 06:14 AM
Hi there,
We are currently testing 10.10 and are experiencing the following problem.
Our macs are bound to AD and when they log in the UNC path from AD is used to mount the home folder. This worked fine in 10.8/10.9.
For some reason, the home folder is now not mounting at all in 10.10. All I am seeing is a question mark on the dock which would indicate a nil alias but it seems like the share is not mounting at all as I am not seeing anything in /Volumes/ . Is anyone else having similar problems with yosemite and the AD plugin?
Posted on 08-23-2016 09:51 AM
Hi guys. As of this week I am rolling out 30 Macs for a cart for a programming lab. I need some help as I have never used Macs in any of my previous jobs. I need to map the home drives for the students but at this point I can't even get it set up to log them in on the domain. So I guess my question is twofold. 1) how to set it up so the different kids can log in using there AD credentials. 2) how to map their home drives so they can have access to them. I have seen the scripts you guys are posting and for a mac I don't even know where to post this script to have it run.
Sorry for being such a newbie.
Posted on 08-23-2016 10:32 AM
Hi @neakins
Although there are some advanced script methods in use, just as a starting point you may be able to get by without them. The basic steps to do what you're looking for are (on each Mac):
In it's default state, the user will log in, create a local home folder and map the network home into the Dock at the bottom of the screen.
Posted on 08-25-2016 02:10 PM
@davidacland we are trying to use your script however cannot get it to work. The policy runs at login and returns that it completed saying.
"Script result: STARTING: User drive mount
Network share already mounted for"
We are trying to create a local home for a user on a Mac and then mount a Network Share for that user.
Posted on 08-25-2016 02:25 PM
Hi @JKingsnorth
It will be getting confused by the logging in user as Casper is running the script as root. If you change any instance of $USER to $3 in the script it should work ok.
Posted on 08-25-2016 05:03 PM
@davidacland IT WORKED! Thank you!
Posted on 09-13-2016 04:44 PM
Sorry that I'm new to scripting so I'm still trying to figure out where to put in or define our Domain and the location of the AD Home drive to update the SBMHome Attribute correctly ...
For example: Our Domain is ........................................ MagicCasper.com
Our AD User Home Folder is ................ Server-03FSHome$%username%
Appreciate if you can help us update the following two lines in the script to make it work ...
Thanks,
ShortDomainName=`dscl /Active Directory/ -read . | grep SubNodes | sed 's|SubNodes: ||g'`
adHome=$(dscl /Active Directory/$ShortDomainName/All Domains -read /Users/$USER SMBHome | sed 's|SMBHome:||g' | sed 's/^[\]*//' | sed 's:\:/:g' | sed 's/ ////g' | tr -d '
' | sed 's/ /%20/g')
Posted on 09-14-2016 09:57 AM
Hi @rahanna
The ShortDomainName
line will read the domain that the Mac is joined to and save the short domain name or Netbios name as a variable. In your example it would be something like MAGICCASPER
The adHome
line will read the logged in users record ($USER) looking for the attribute called SMBHome and it will save the value in the variable.
So as long as you are putting the Server-03FSHome$%username%
value into the home folder section of the profile tab in user account properties in AD, the script will read from there.
The only other catch, running the script with Casper means it is executed as root, so $USER doesn't work. If you are running it as a login policy, you need to change $USER to $3.
Hope that helps.