Sciuriware

Q: How can I connect my MacBook to a WindowsXP in the Terminal?

Hello,

at present I get this done by:

Finder, cmd+K, <choose Server Address>, [Connect], connect as Guest, [Connect], (shows sharename), [OK]

[ ] is a button clicked.

 

I would like to do the same in a bash commandline.

Thanks.

;JOOP!

MacBook Pro with Retina display, OS X Mountain Lion (10.8.5)

Posted on Nov 8, 2013 10:31 AM

Close

Q: How can I connect my MacBook to a WindowsXP in the Terminal?

  • All replies
  • Helpful answers

  • by ivansky,Helpful

    ivansky ivansky Nov 10, 2013 1:52 AM in response to Sciuriware
    Level 2 (279 points)
    Nov 10, 2013 1:52 AM in response to Sciuriware

    If I understand your question correctly, you want to mount a network share from a Windows file server at the command line?  The following article should probably help:

     

    http://osxdaily.com/2009/09/24/access-and-mount-an-smb-share-via-command-line/

     

    Hope this helps.  I don't have access to any Windows systems here so I can't really test this out and check that it is still all valid for Mountain Lion.

     

    Ivan

  • by Sciuriware,

    Sciuriware Sciuriware Nov 11, 2013 9:09 AM in response to ivansky
    Level 1 (8 points)
    Mac OS X
    Nov 11, 2013 9:09 AM in response to ivansky

    Hi, indeed that URL and some others helped me.

    The reason I want to work from the commandline is that I program in JAVA.

    To overcome the language limitations I spawn bash commands or (directly) unix-commands from JAVA.

     

    For some reason I failed to spawn this command:

     

    /bin/bash -c /bin/mkdir /Volumes/XpShare; /sbin/mount_smbfs //guest@XPsystem/XpShare /Volumes/XpShare

     

    so, for the time being I put it in a file and invoke "/bin/bash myScript.sh"

     

    that works.

     

    Btw, is this also THE way to connect to another Mac? (I ordered one) or should I use another protocol between Mac's?

    ;JOOP!

  • by ivansky,Solvedanswer

    ivansky ivansky Nov 12, 2013 1:43 AM in response to Sciuriware
    Level 2 (279 points)
    Nov 12, 2013 1:43 AM in response to Sciuriware

    I'm not really an expert on your second question, but I think the answer is "it depends".  If you want to mount a share from another mac, I think it will depend on how you have exported the share.  If you look in "Sharing" under "System Preferences" and then click "Options" you can choose whether you want to use SMB or AFP.

     

    The following two articles may tell you more than you ever wanted to know about file sharing on OS X:

     

    http://support.apple.com/kb/HT5884

     

    http://support.apple.com/kb/HT4538

     

    Hope that helps or someone else may chime in with more detail.  Otherwise, give it a try when you get your second mac and start another thread if you are having problems.

     

    Ivan

  • by Sciuriware,

    Sciuriware Sciuriware Nov 12, 2013 2:37 AM in response to ivansky
    Level 1 (8 points)
    Mac OS X
    Nov 12, 2013 2:37 AM in response to ivansky

    Thanks a lot.

    ;JOOP!