Suppress Network Drive Mount on User Login

stutz
Contributor

We enable a user home drive to auto mount in AD when a user signs in. I was told we need to keep this enabled but as soon as the computer goes offsite it takes a few minutes to show the error message that it cannot find the network drive. I would like to fix this if possible by disabling the auto mount within the OS but still keep it enabled at the AD level. Is that possible?

1 ACCEPTED SOLUTION

davidacland
Honored Contributor II

You need to disable the "Use UNC path to derive network home location" option in Directory Utility to stop the Mac OS from trying to mount the share.

From a policy, you can send the following command: dsconfigad -useuncpath disable

If you would still like to map the network home when users login, but only on the LAN, you can use a script instead, triggered by a login policy, restricted to the LAN network segment. Heres our script that you're welcome to use:

https://github.com/amsysuk/public_scripts/blob/master/mount_SMBHome/mounthome.sh

View solution in original post

2 REPLIES 2

davidacland
Honored Contributor II

You need to disable the "Use UNC path to derive network home location" option in Directory Utility to stop the Mac OS from trying to mount the share.

From a policy, you can send the following command: dsconfigad -useuncpath disable

If you would still like to map the network home when users login, but only on the LAN, you can use a script instead, triggered by a login policy, restricted to the LAN network segment. Heres our script that you're welcome to use:

https://github.com/amsysuk/public_scripts/blob/master/mount_SMBHome/mounthome.sh

stutz
Contributor

Thats exactly what I needed. That script works perfectly. Many thanks!