We are testing a local login script that we created for our Macintosh users on Lion. It has worked fine on all OS X versions prior to 10.7. Listed below is the script that we are using. When we run the script, it now mounts a folder called "home" instead of "username" and throws an error stating that "The folder can't be opened because you don't have permissions to see its contents." I have referenced the following Apple document and it was not helpful in resolving the issue.

The following is the share path that we are trying to mount to in the script:


and the following NTFS permissions have been provided to the respectively listed directories.

  • /home -- All users can Read attributes, Read extended attributes, Read permissions
  • /home/username -- All users have full control of this folder

Here is the script that we place in /usr/local/sbin:



IP="$(dig $HOSTNAME +short)"

VOLUMES="/Volumes/Workarea /Volumes/$username"
for volume in $VOLUMES ; do
    [ -d $volume ] && umount -f $volume

if [ "$username" != "adminuser" ] && [ "$username" != "setupuser" ]; then
    osascript -e "try" -e "mount volume \"smb://domain.com/Workarea\"" -e "end try"
    osascript -e "try" -e "mount volume \"smb://domain.com/home/"$username\" -e "end try"

killall -u $username Terminal

I am not sure what additional NTFS permissions need to be provided or if we have something that we need to edit in our script since Apple changed some of the SAMBA items in Lion.

I added a posting to the Apple Support Community here since I have not gotten any hits from here yet.

You must log in to answer this question.

Browse other questions tagged .