Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

mounting a smb/cifs share to sub folders

Hi



we have a windows 2008 r2 smb/cifs server it a share called UserFiles in this share are a bunch of subfolders particular to the user



\\nova01\UserFiles\Site\username



so I tried in a script



mount volume "smb://nova01/Userfiles/VAC/12345



and it mapped //nova01/Userfiles/



however if I sub in



tell application "Finder"

open location "smb://nova01/Userfiles/VAC/12345

end tell



it works , any way I can get that full path mapped to the sbub folder 12345 ?

Posted on Aug 27, 2012 12:31 PM

Reply
4 replies

Feb 22, 2013 11:53 AM in response to merrittr

ok here is what fixed it after wating time with SH*TTY applescript, use



#!/bin/bash -x





user=`ls -la /dev/console | cut -d " " -f 4`



vers=`sw_vers -productVersion|cut -c 3-4`



if [ ! $vers >= 7 ]; then


mac_path=`/usr/bin/dscl localhost -read /Active\\ Directory/All\\ Domains/Users/" & userName & " SMBHome | awk '{print $2}'`



else


mac_path=`/usr/bin/dscl localhost -read /Active\\ Directory/STPAUL/All\\ Domains/Users/$user SMBHome | awk '{print $2}'`



fi







echo $user



echo $vers









if [ "$mac_path" == "" ]; then # outter if


mount volume mac_path



else




DIRECTORY="/Volumes/$user"




echo $DIRECTORY




if [ -d "$DIRECTORY" ]; then #inner if

mount_smbfs $mac_path $DIRECTORY


else

mkdir $DIRECTORY

mount_smbfs $mac_path $DIRECTORY



fi # inner if



fi # outter if

mounting a smb/cifs share to sub folders

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.