#!/bin/bash # Trying to umount NDS share # This script gets called from pam_ncp_auth # The first parameter to be passed is the user’s /home directory. #This test should always fail: if [ -z $1]; then echo “Usage: $0 /home/directory” exit 1 fi # Change to the directory that was passed in: cd $1 #Get the physical location, such as /mnt/ncp/userdir MNTPOINT=’pwd –P’ #Go one level up in the directory tree; otherwise, the #mount stays “in use.” cd .. #Call doUmount in the background. If you try to do # umount as a foreground task, the user doesn’t get # logged out until the umount goes through. var/ltsp/bin/doUmount $MNTPOINT & # Don’t care exit 0