Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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://\"" -e "end try"
    osascript -e "try" -e "mount volume \"smb://"$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.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.