>On Wed, 1 May 2002, Jason Bourque wrote: > >> Is it possible to write a perl script that will mount a share via samba? >> >> Any sample code would be great. > >Great question! I'm interested in this, too. I think smbmount might be >the command to use, but I haven't been able to get it to work. > >I've read, also, that smbmounting more than one fileshare causes kernel >instability. Does anybody know what list to go to, or where I might ask >about things like this? I'm trying to support several MacOS X users in a >university environment where we have a bunch of Samba-based network >shares, and I'd like to plug them in better. > > >-- >MattLangford
Pre-warning, I'm biased, as I work for Thursby Software Systems, Inc. Samba is mostly a server, so it's not likely that you really want to mount _via_ Samba, you probably want to mount a Samba volume via an SMB or CIFS client. Actually, the Samba package does include a way to mount a filesystem as a client, but I don't believe that this works on OS X. (They also include a rudimentary command-line client, which I don't believe you want.) Apple does ship an smb client with OS X, but yes it has problems, only one of which is being limited to one mount at a time. (Lack of browsing the network is another.) DAVE, on the other hand, is a robust client (and server if you want), which can connect to many shares at once, handles FAT and NTFS volumes and servers of many kinds (Windows 95/98/ME/NT/2K/XP and many UNIX-based servers including Samba servers). To answer your question, it also supports mounting via AppleScript. The syntax for mounting via DAVE for Mac OS 9 is along the lines of mount share "share" on server "servername" user "randy" password "foo" domain "ENG" volume named "desktop volume name" or mount share "cifs://server/share" In DAVE for OS X it should be similar. In fact, it is a bit better, as there is a way to include the necessary username (and domain) and password in the URL, too. But I'm running 9, not X, so you'll want to look it up in the online docs. Once you've gotten DAVE to mount your volume via AppleScript, I'm sure someone here can help you redo the one-line AppleScript in Perl. -Randy ############################################################## # Thursby Software Systems, Inc. # # # # Randy Boring Network Engineer # # 5840 W. Interstate 20 Suite 100 Arlington, Texas 76017 # # Phone: 817-478-5070 Fax: 817-561-2313 # # email: [EMAIL PROTECTED] web: www.thursby.com # # # ##############################################################
