Hey all,
I would like to automate the mounting of our Users Windows home directory. If I leave "Use UNC path from Active Directory to derive network home location" checked, it will find the home folder (or at least it seems), place it in the right side of the Dock. Unfortunately the folder is not accessible and has a ? in place of the icon, nor is there a way to remove it. So next step was to uncheck the above option and try to script this.
So in trying to script this, I have come up with this
#!/bin/bash
#This will make the temp directory that is needed to mount the Home Dir
whd=/Users/Shared/tmp/
if [ -d "$whd" ]
then
echo "exists"
sleep 5
else
mkdir $whd
echo "now exists"
fi
#Get the home directory for the logged in user and then mount the users home directory
dscl . read /Users/$3 SMBHome
#Next mount the Home Directory
mount_smbfs -N //fileshare/path/ /Users/Shared/tmp/
my problem now is how to pipe only the result of dscl . read /Users/$3 SMBHome to the //fileshare/path.
Can anyone provide some scripting-fu to help, or if there is a better way to do this?
Thanks in advance.