There are shared drives that need to be mounted at logon on Apple Mac OS X machines
RESOLUTION 1:
First try the following simple script::
1. Create a Logon Script in Group Policy, under User Configuration | Policies | Unix settings | Quest Authentication Services | Client Configuration | Logon Scripts.
2. Click Add
3. Provide a name for the script click Add
4. Select the new script and click Edit Script
5. Paste the following in:
#!/bin/sh
/usr/bin/osascript -e 'mount volume "smb://<servername>/sharename"'
exit
6. Click apply.
If this script does not work, then please try resolution 2.
RESOLUTION 2 :
This script adds delays to allow Finder time to startup prior to the mount command being issued.
1. Create a Logon Script in Group Policy, under User Configuration | Policies | Unix settings | Quest Authentication Services | Client Configuration | Logon Scripts.
2. Click Add
3. Provide a name for the script click Add
4. Select the new script and click Edit Script
5. Paste the following in:
#!/bin/sh
/usr/bin/osascript -e "tell application \"Finder\"" -e "delay 0.3" -e "try" -e "mount volume \"smb://server.name/sharename\"" -e "on error" -e "delay 5" -e "try" -e "mount volume \"smb://server.name/sharename\"" -e "end try" -e "end try" -e "end tell"
exit 0
6. Click apply.
RESOLUTION 3:
When using the osascript command the end user will only see the share root displayed in Finder.
You may however require the subfolder to be shown.
For example the following script uses mount_smbfs to mount a users home directory:
#!/bin/sh
mountUser=$(whoami)
mkdir /Volumes/$mountUser
mount_smbfs cifs://servername/sharename/$mountUser /Volumes/$mountUser
exit 0
© 2025 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center