Working Apple Script to mount shares with logged in user Credentials
Below is an Apple Script I have done up that can be used as a login script to mount a share. You can add multiple shares if you wish to the script.
The script will poll for the logged in user/password then mount the share.
All you need to replace in the script below is "Server" & Share" the left should be left as is.
To test, if you login using an AD user or even an OD user then run the script you will see the share mount.
set MyName to do shell script "whoami"
tell application "Finder"
mount volume "smb://SERVER/SHARE/" & MyName & ";" & MyName & ":password"