Network Homes: Automounted home shares not logging out

New Contributor III

We are seeing that even after a network user logs out their home folder share is remaining mounted with an active connection to the server.

Server: Windows 2008 R2
Clients: 10.11.4
See this with both AFP and SMB

6W-410-11:~ admin$ mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
map -fstab on /Network/Servers (autofs, automounted, nobrowse)
**//stest@students2.cgps.domain/StudentHome2/stest on /home/stest (smbfs, nodev, nosuid, automounted, nobrowse, mounted by stest)**

Honored Contributor II
Honored Contributor II

That's odd, I didn't think that was the default behaviour but I'm not sure if I've specifically checked before.

You could add umount /Volumes/$USER as a logout script to make sure it disconnects (unless that doesn't work either due to a weird underlying problem).

New Contributor III

So you have network homes using SMB that discount the auto mount share successfully on logout? What OS?

Thats what I did. However, If I tried it anytime during the logout it would not unmount so I had to actually add this to a Casper Logout Policy Script:

echo "Running unmount script asynchronously"
/Path/To/Script/ $3 &

Then in a separate script launched asynchronously:

if [ -n "$1" ]; then
  sleep 10
  echo "Unmounting /home/$1 from client"
  umount -f /home/$1