Mounting Network Volumes in the Command line

What is the command for mounting a Network volume in a command line.... Plus when done this way will it get the password from keychain?

The command in question is mount:
<pre class=command>mount -t type server:/path/to/share /path/to/mountpoint</pre>
This will mount the share /path/to/share from server server using protocol type (e.g. 'afp', 'nfs', 'smb'). The sharepoint will be mounted at the local /path/to/mountpoint
mount will not use the keychain. If you require passworded access you can either include the username and password in the command, or switch to using an AppleScript solution which can use the keychain, and can be involked via osascript:

Similar Messages

  • How do I create a local account from a network login from the command line?

    I am connecting to my organization's domain using 3rd party software which doesn't allow for using the GUI for creating local accounts.  How can I do this through the command line or is there a better way to script it?  Thanks in advance!

    What you're looking for, I think, is mobile accounts with portable home directories.
    Portable Home Directories in 10.8...: Apple Support Communities
    Configuring OS X Server 10.8 – Open Directory and PHD

  • How do you change network settings at the command line when they were set in the

    Ubuntu server setup in a remote location awhile ago, with GUI packages. Currently at
    version 14.04 LTS. There is ssh access to the remote server.
    After a lot of digging thru typical command line configs and not finding the existing
    settings anywhere, it appears the only way to update existing settings -- DNS
    name servers, IP's, etc. -- is using a GUI method, such as gsettings or unity-control-center.
    However,
    gsettings doesn't appear to have those particular items.
    Is
    the only option to use a remote version of Unity .... or just get someone
    on-site and remedy this thru the GUI?
    This topic first appeared in the Spiceworks Community

    Hi and thanks for your reply,
    I used one mini DV Tape for my footage and captured the whole thing into CS6 in one go and so the capture should have been the same throught all of the film. Once I had edited the tape on to the timeline some of the clips are 16.9 widescreen and others are 4.3 standard.
    Help!!!!!

  • Un-mounting network volumes with command line

    Does anyone know how to unmount a network volume from the command line in OSX. Using umount deletes the mount but not the mount point. I can't get diskutil or disktool to do it.

    I don't use smb much, but it does look like there's something funny going on. On my system, smb shares mounted from the "Finder" are unmounted normally (mountpoint deleted, "Finder" icon gone) using: 'umount', or eg.<pre>osascript -e 'tell application "Finder" to eject disk "volumename (not mountpoint name)"</pre>But shares mounted using 'mount_smbfs' behave as you describe with respect to the "Finder". But I couldn't reproduce the ".autodiskmounted" file issue in my limited testing involving "normal" use. Sorry, I don't have much more to add - maybe someone more familiar with smb can comment...

  • I am trying to set an open DNS using the MacAir. But when I tried to flush the existing one at utilities/terminal, it will not work.  I am using Yosemite.  May I know what should be the command line so that I can shift to an open DNS?  Thanks

    I am trying to set an open DNS using the MacAir. But when I tried to flush the existing one at utilities/terminal, it will not work.  I am using Yosemite.  May I know what should be the command line so that I can shift to an open DNS?  Thanks

    >SystemPreferences>Network>DNS

  • How can I start System Preferences from the command line?

    Hello All,
    I have an issue I'm not quite sure how to solve. I have been tasked within my business environment  with tightening security on a Mac Leopard system and I've been granted Admin Rights to do this on a temporary basis.
    The problem is as follows:
    1) The original Sys Admin that set up this system is gone, no longer available.
    2) He was a Dvorak Keyboard fan and set up the system for a Dvorak Keyboard.
    3) The system actually has a standard Apple keyboard and is marked accordingly, i.e., qwerty (Most Users in the building have stopped using this system altogether - a terrible waste of a good system - even though some of their apps can be run normally (US style qwerty settings). The command line is useless, as is texteditor.app and a few others unless you know Dvorak layout)
    5) When I open System Preferences, the Dvorak keyboard checkbox is grayed out and I cannot change it. There is no lock at the bottom of that particular screen for me to unlock.
    6) Even though I select the US Keyboard at Login, and some apps work accordingly (like MatLab for example) the terminal is borderline useless. I spent over 2 hrs yesterday doing what should have been able to be done in about 30 minutes. I estimate a frustrating and mistake prone additional 8 to 10 hours to do what is normally a a 4 hour job at the command-line.
    7) I do not have the time or desire to re-mark all the keys on the keyboard, particularly since it is not my call to do so, nor do I have the time to re-learn Dvorak touch-typing, and finally I do not want to re-load the entire system. I just want to change the darn keyboard to a standard qwerty keyboard that is somewhat useful in a terminal environment with vi, command line, etc. It's either that or I go mildly insane
    This is frustrating as all get-out. The new Admin logged in and was able to uncheck his Dvorak settings (he is not a UNIX guy, nor is he comfortable om Macs), and we were hoping this was a system wide setting, but No. We re-booted the system, I logged in, still Dvorak, and the checkbox was still grayed out.
    So I figure, short of re-loading the entre system and all the applications necesary, I can either start the Systems Preferences GUI using sudo and hopefully that will change system-wide settings, or I can delete the .AppleSetupDone file and resetup the system (if the keyboard settings are part of the setup) without spending a couple of days reloading everything and re-setting up users, networks, etc.
    Needless to say, I am hoping for the easiest and quickest solution to this extremely frustrating and  aggravating problem.
    Thanks.

    For my situation the following C# code does the job:
        Process.Start(
           @"c:\Program Files\National Instruments\CVI71\cvi.exe",
           @"c:\temp\experiment.c" );
    The file must already exist.

  • How do i create a database template from the command line?

    Hi,
    As part of implementing a backup and recovery strategy for a client (including disaster recovery) I want to automate the creation of a database template From an Existing Database (Structure as well as data) via a script that will run every night.
    The background to this is that we will also be using RMAN to take backups of the database concerned but the client does not want to wait while an RMAN backup is restored and so wants an additional level of insurance in the form of a ‘standby’ clone database.
    The idea is that nightly we will run a script that creates a database template from the Existing Database (Structure as well as data) and then transfers the 2 files involved e.g. DB_data_included.dbc and DB_data_included.DFB across to a standby server where they can be used to recreate the database in the event of us needing to after e.g. a complete server failure.
    So I have a couple of questions about this that I would be very grateful if something could answer for me:
    1)     Is it possible? That is, can a database template be created from some utility by supplying a series of parameter=value pairs on the command line?
    2)     If yes how do I go about it, what utility do I use (the emca utility?). and what parameters do I need to supply on the command line to create the template?
    3)     The intention is that the script to create the template will run in the early hours of the morning when no-one is using the database but what state does the database need to be in when the template creation script runs i.e. up, down, mounted and does the creation of a template affect the state of an already up database i.e. if I kick off the template creation script and the database is up will it switch it into mount mode or anything like that? My concern here is that I want to make sure I understand exactly what is going on so that no users or connected external systems are affected?
    Thanks in anticipation of someone being able to guide me on what to do or what documentation to read.
    Also if you require any clarification on what i'm asking please post up your query and i'll respond ASAP.
    Kind Regards,
    George Johnston
    OCP 9i DBA

    Sybrandb,
    Firstly thanks for you reponse.
    However, I don’t agree that dbca only creates empty databases otherwise why does the option to create a template from an existing database (structure as well as data) exist in the dbca wizard?
    I have performed a test case where I have a created a database template including data on one 10g server. I have then used the files generated to recreate that database on a separate server. When the new database is started it is an exact copy of the original. So it’s not empty at all , it’s exactly what the client wants.
    So I don’t agree that I’m gaining zero.
    Why is this approach doomed to fail?
    There a number of reasons why I “just set up a proper standby database”
    1.     Time – I’m on a customer site in a tight engagement where the customer wants maximum value for money. I don’t have standby database skills and the customer isn’t willing to pay for me to learn on the job so please understand the tight circumstances I’m working in.
    2.     Availability – As far as I know the client is running 10.2.0.3.0 standard edition. Correct me if I’m wrong but is standby db available in that edition. Where do I look to check V$OPTION.
    On the RMAN duplicating a database front it’s an area I haven’t used before but I will take a look at it.
    Also please revisit the context of my original posting where I state
    The background to this is that we will also be using RMAN to take backups of the database concerned but the client does not want to wait while an RMAN backup is restored and so wants an additional level of insurance in the form of a ‘standby’ clone database.
    So please understand that this a quick fix that the client wants developed in the minimum time possible in ADDITION to a full nightly RMAN backup being taken.
    In an ideal world I’d have the time to follow best practice but in the real world of on-site customer support I just need to get the job done operating under the customer imposed constraints.
    Many Thanks,
    George Johnston
    OCP 9i DBA

  • Compress/zip files from the command line in Windows 7?

    In Windows 7 is there a native way to compress or zip files from the command line?  I'd like to do it without installing any third-party utilities such as 7Zip.

    I fully agree that Compact is not the answer. There are additional concerns with the Compact command. It enables disk compression which is a total no-no. Very bad! It makes your computer very slow and is quite difficult to undo. The only time anyone should
    use this command is when they're removing disk compression because someone turned it on to save space.  Turning this off has to be done by booting into the recovery console, if my memory serves me correctly, and it's a real nuisance.  So
    definitely no to the Compact command.
    If you wanted to compress files before sending them to another drive, or over a network, or by email, then Compact wouldn't actually help at all because the files have to get uncompressed whenever they're accessed, especially before sending them anywhere. 
    When I say accessed, I mean that just looking at a file triggers the OS to decompress it in the background and present you with an uncompressed version of it then letting you change it and recompressing it again for storage every single time you access the
    file, which is why your machine gets slower.  If you have folders or files that have blue text instead of black, then you've probably already made this mistake.
    I would also like to know if there is a built-in command for zipping files/directories, or, if there isn't such a thing built into Windows, then I would like to know if this is feature is accessible through Visual Studio, which would be just as good as having
    a command-line program for those of us that do a bit of programming.
    If anyone knows if MS provides such a feature, either by command-line or through an API, then I'd love to hear about it.  Good luck to those of you that have disk compression turn on.

  • How to hide a network volume on the finder.

    We use a java application to manage advertising.
    This application must reach a smb network volume to access to
    the files. On the other hand we do not want that the users can access to
    this network volume (to see this network volume on the finder).
    It is possible to hide a network volume on the finder.
    Any suggestions?
    Thanks for the help.

    Finder -> Preferences -> General -> Show these items on the desktop and uncheck the 'Connected Servers' option.
    Alternatively, if you want to leave other servers showing, you can manually mount the volume at any other point, bypassing the /Volumes directory:
    mount smb://server/sharename /some/other/mount
    This should mount the share at the path /some/other/mount rather than at the default /Volumes/sharename

  • Running a jar from the command line

    I am trying to run a Jar from the command line. I have a number of classes in a package called "trainnn".
    I put all the classes into a jar
    jar cvf name.jar trainnn\*.classI then creat a file called mainClass.txt with the line (with a blank return line after it, where QueryMatch has the main). This file was placed in the same directory as the package and the jar file
    Main-Class: QueryMatch
    then
    jar cmf mainClass.txt network.jar G:/TrainNN/src/trainnn/QueryMatch.classthis worked fine.....but it is from here I have problems when I try run the jar
    java -jar network.jarbut get this error.
    Exception in thread "main" java.lang.NoClassDefFoundError: QueryMatch
    I cant figure out this error, I have tried specifying the exact path in the mainClass.txt file but that didnt work.
    Any ideas
    Thanks in advance.

    Hi,
    To start a java app in the command line with "java -jar yourJarFile.jar", the jar needs to have a mainfest file "MANIFEST.MF" in a folder called "META-INF". The manifest file would have to contain the name of your starting class, e.g. it could look like thisManifest-Version: 1.0
    Main-Class: com.yourCompany.yourProject.YourClass Hope that helps. Cheers, HJK

  • How to check for physical damage on a disk using the Command Line

    I have a startup disk that I suspect of physical damage. The symptoms is that the server (10.4.7) would "hang" randomly, about once a day. I have already changed it and restored from a backup, and now everything is fine. However just out of curiosity are there any command line utilities to do a physical surface scan of the drive, like TechTool Pro but included in Mac OS X Tiger?
    G4 Dual 1.42 Ghz   Mac OS X (10.4.6)  

    Extract from the Command Line Guide for Tiger Server:
    Checking for Disk Problems
    You can use the diskutil or fsck command (fsck_hfs for HFS volumes) to check the physical condition and file system integrity of a volume. For more information, see the related man pages.
    MacBook Pro   Mac OS X (10.4.7)  

  • How to list a shared directory from the command line?

    My iMac is on a LAN with some windows machines and has access to a shared folder on one windows machine in particular. On the iMac, this shared computer shows up as 'tabernacle' and I can see its contents in the finder. I'd like to be able to inspect the contents of this folder using the command line but I have no idea what path to use. Can anyone tell me where to find mounted shared folders from the OSX command line?

    Open the Terminal in the /Applications/Utilities/ folder and drag it from the Finder to the open Terminal window. The path will appear.
    (54518)

  • Visualizer via the command line?

    Does anyone know of a way to start iTunes from the command line with the Visualizer engaged? (preferably in full screen mode). My mother-in-law likes to have the Visualizer running even when not listening to music, so I was wondering if it possible to activate it as a type of screen saver.

    Not being able to browse is a common problem under Sno. Adding a new location has worked for some.
    Go System Preferences > Network > Location.
    Edit location (whatever name you want).
    Click + and then click done.
    Try your browser.
    And, here is another possibility that has worked for others.
    Go Finder > Your HD > Library > Preferences > SystemConfiguration.
    Move the SystemConfiguration folder to your Desktop.
    Restart.
    Try your browser.
    Keep your System Configuration folder for a while just in case.

  • How to use long capture filter with Network Monitor 3.4 command line

    I want to exclude all traffic from a list of subnets in my capture. This makes for a rather long and complex filter. Is there any option on the command line to refer to a file describing this filter or can one only use the /capture "my extremely long
    filter" command? So, I would have to make the entire thing into one line?

    I suppose if it's longer than 2048 or 4096, there will be a command line length limitation.  Maybe there's a way to work around it with a environment variable, but I think there will always be a limit.  Perhaps there's an easier way to right your
    filter?  Can you use something like the subnet example in the library to shorten the filter.
    Also, do you think your filter will affect capturing speed.  The more complex the filter, the longer it takes to evaluate each incoming message.  That means we have to buffer, and if the firehose is too much, we don't catch all the water :) 
    If the UI can keep up, then it shouldn't be a problem, but some firehoses are bigger than others.  Plus, there driver filters which can filter faster for NMCap.
    Moving forward, Message Analyzer (http://blogs.technet.com/blogs), is the replacement for Network Monitor, which can do the same most of the same kinds of capabilities, but using powershell.  I think you'd
    have more flexibility with variable lengths there.  Plus you can script fancy things.
    Paul

  • Faxing to a Bonjour modem from the command line

    I am trying to send a fax through an internal modem (on a G5 iMac) shared through Bonjour. I want to be able to use the command line (Terminal). The "fax" command works from the G5 iMac. But I can't seem to be able to fax from other computers sharing this modem.
    I have tried to play with the fax, efax, lp, and lpr commands but can't seem to be able to get it right. How do I specify the modem in the command line for efax? Where is it under /dev?
    When I use lp, I can't seem to be able to specify the phone number to dial, though the file is spooled correctly to the modem. The "-o phone=<number>" option did not work.
    Can anyone help?

    Okay, so I finally figured it out. It can be done using lp command but instead of specifying the shared modem (fax) as a shared device with its host name (e.g. "Internal Modem @ Mac_name" which converts to "Internalmodem___Macname" on the command line), one has to do it as this:
    lp -d Internal_Modem -h Mac_name.local -o phone=<number> fileToFax
    This way any older mac on the network can be a fax server and one can dispense with the problematic USB modems from Apple. The command can be passed to the Terminal by AppleScript using "do shell script 'lp...'"
    I am using PDFpen in my paperless office and since it is scriptable, I can fax right from the application using this command thru AppleScript.
    Hope this helps someone.

Maybe you are looking for