Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Apple Software > Mac Programming
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Feb 4, 2008, 09:12 PM   #1
drummer21scum
macrumors newbie
 
Join Date: Feb 2008
Mount smb shares on login

Hi total newbie to mac os x, work in a server 2003 environment, starting to introduce mac's at work, using leopard...

i was just wondering if anyone knows the script to mount a windows share eg.
\\mySrver\myShare$ and then add it to the finder sidebar...

just sick to death of going to finder>connect to server etc

any help would be great
drummer21scum is offline   Reply With Quote
Old Feb 5, 2008, 12:13 AM   #2
larkost
macrumors regular
 
Join Date: Oct 2007
There are a few different routes to go:

If you are in an "enterprise" setting, then there is a good chance that there is an Active Directory server in the mix, and you can then bind to the AD server, and your "home" folder can be auto-mounted at login. You just need to use the directory utility for that.

Another option is to make an alias of the folder (inside the share) that you want. Unlike Windows shortcuts, aliases can contain the data needed to get to the share.

Another option is to make the alias, then put it in your login items.

After that there are a whole number of other ways (mount_smbfs on the command line, MCX if you are really good, etc), but I think you should probably chose one of the first three.
larkost is offline   Reply With Quote
Old Feb 5, 2008, 09:29 AM   #3
jeremy.king
macrumors 601
 
jeremy.king's Avatar
 
Join Date: Jul 2002
Location: Fox Lake, IL
I use an Applescript application. Only because I didn't want to explain to the wife how to execute a shell script. A simple alias on the desktop, a double click, and Bam!

Code:
tell application "Finder"
	mount volume "afp://username:password@hostname/sharename"
end tell
if you want SMB, simply change the afp to smb.

Last edited by jeremy.king : Feb 11, 2008 at 09:14 PM. Reason: better way to do this.
jeremy.king is offline   Reply With Quote
Old Feb 6, 2008, 03:40 AM   #4
drummer21scum
Thread Starter
macrumors newbie
 
Join Date: Feb 2008
worked at treat! thanks, not to be a bit greedy but you wouldnt know how to add the share to the finder sidebar after it opens, would you? cos for some reason in leopard when u connect to a share its not mounted on the desktop or finder for some reason? strange
drummer21scum is offline   Reply With Quote
Old Feb 6, 2008, 10:21 AM   #5
jeremy.king
macrumors 601
 
jeremy.king's Avatar
 
Join Date: Jul 2002
Location: Fox Lake, IL
You can show volumes on the desktop by going to Finder Preferences and under the General Tab click the Connected Servers check box. To add the volume to the devices list, you can drag the now visible drive from the finder desktop into the list of devices in a finder window, and everytime you reconnect it should show up in the list.
jeremy.king is offline   Reply With Quote
Old Feb 8, 2008, 04:44 AM   #6
satyam90
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
Quote:
Originally Posted by kingjr3 View Post

Code:
tell application "Finder"
	open location "afp://username:password@hostname/sharename"
end tell
Will the above script work only for windows 2003 server? What script I have to use if I want to connect to Windows XP or Linux/Unix machine?
satyam90 is offline   Reply With Quote
Old Feb 8, 2008, 05:12 AM   #7
itsallinurhead
macrumors 6502
 
Join Date: Apr 2007
Location: Southern California
Send a message via AIM to itsallinurhead
Quote:
Originally Posted by satyam90 View Post
Will the above script work only for windows 2003 server? What script I have to use if I want to connect to Windows XP or Linux/Unix machine?
I thought you wanted to use "smb://...." if you were connecting to a windows shared drive?
itsallinurhead is offline   Reply With Quote
Old Feb 9, 2008, 04:35 AM   #8
satyam90
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
How about connecting to Linux/Unix systems???
satyam90 is offline   Reply With Quote

Reply

Mac Forums > Apple Software > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:03 AM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC