Skip to main content
Solved

Suppress Network Drive Mount on User Login

  • August 31, 2016
  • 2 replies
  • 9 views

stutz
Forum|alt.badge.img+5
  • Contributor
  • 78 replies

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?

Best answer by davidacland

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

2 replies

davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • 1811 replies
  • Answer
  • August 31, 2016

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
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 78 replies
  • September 1, 2016

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