[DM-MUG] applescript and samba volumes

Bryan Baker ka_klick at mac.com
Wed Dec 13 14:21:22 CST 2006


Well, I do it w/ an applscript on my laptop, but for a smb share I  
need our Xserve to access for backups, I just have a cron job that  
uses the mount_smbfs command.

here's the script I use on my laptop:

tell application "Finder"
	activate
	open location "smb://<username>@<server>/<private share>"
	open location "smb://<username>@<server>/<public share>"
end tell

(I replaced all real values w/<placeholders>)

here's the bit I put into /etc/daily.local which runs every night:

# Mount the backup directory if not mounted
if [[ -e /Volumes/<path to a file I put in the target directory> ]]
then
         echo All good - it is here
else
         /sbin/mount_smbfs //<user>:<password>@<server>/<share>  
<mount point>
fi

so it checks and makes sure it's there, if not it mounts the share.

Hope that helps.



On Dec 13, 2006, at 11:16 AM, Barry Von Ahsen wrote:
> I'm helping with an xserve that mounts a samba share via  
> applescript. Is there a way to specify what group it gets mounted  
> as?  It is already using "as username", but I couldn't find how to  
> do a group.  I know I can do this using bsd tools, but I wanted to  
> try to do it the os x way
>
> -barry
>
> _______________________________________________
> Dmmug mailing list
> Use this Address to send mail to the list:
> Dmmug at dmmug.org
> Use this page to modify subscription options:
> http://cialug.org/mailman/listinfo/dmmug

--
Bryan Baker
President
Des Moines Macintosh Users Group
http://www.dmmug.org
president at dmmug.org



More information about the Dmmug mailing list