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...

Similar Messages

  • Auto-mount network volumes upon changing locations

    As I am shifting my Macbook between office and home and with working in office I need to access frequently into a few network locations which I ended up mounting them regularly manually.
    Any solution on that so I can pre-set what volumes to mount upon changing locations?
    Or perhaps auto-mount network volumes upon joining a particular SSID?

    I'm sure there's a way to Script it, but that being beyond my capabilities, here's how I'd do it using Dynamic mounts...
    Make two New Folders on the Desktop, (Office and Home might be good names).
    After Mounting the Volumes at work, drag the Globe Icons to the Office Folder, after mounting the Shares at home, drag them to the Home folder, (you can even rename them once in the folders).
    Drag those two Folders to the Dock between Applications and Trash to have two popup menus for nearly instant connecting.

  • How to change a setting in the Java Control Panel with command line

    Hi,
    I am trying to figure out how to change a setting in the Java Control Panel with command line or with a script. I want to enable "Use SSL 2.0 compatible ClientHello format"
    I can't seem to find any documentation on how to change settings in the Java Control Panel via the command line
    Edited by: 897133 on Nov 14, 2011 7:15 AM

    OK figured it out. This is for the next person seeking the same solution.
    When you click on the Java Control Panel (found in the Control panel) in any version of Windows, it first looks for a System Wide Java Configuration (found here: C:\Windows\Sun\Java\Deployment). At this point you must be wondering why you don't have this folder (C:\Windows\Sun\Java\Deployment) or why its empty. Well, for an enterprise environment, you have to create it and place something in it - it doesn't exist by default. So you'll need a script (I used Autoit) to create the directory structure and place the the two files into it. The two files are "deployment.properties" and "deployment.config".
    Example: When you click on the Java Control Panel it first checks to see if this directory exists (C:\Windows\Sun\Java\Deployment) and then checks if there is a "deployment.config". If there is one it opens it and reads it. If it doesn't exist, Java creates user settings found here C:\Users\USERNAME\AppData\LocalLow\Sun\Java\Deployment on Windows 7.
    __deployment.config__
    It should look like this inside:
    *#deployment.config*
    *#Mon Nov 14 13:06:38 AST 2011*
    *# The First line below specifies if this config is mandatory which is simple enough*
    *# The second line just tells Java where to the properties of your Java Configuration*
    *# NOTE: These java settings will be applied to each user file and will overwrite existing ones*
    deployment.system.config.mandatory=True
    deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    If you look in C:\Users\USERNAME\AppData\LocalLow\Sun\Java\Deployment on Windows 7 for example you will find "deployment.properties". You can use this as your default example and add your settings to it.
    How?
    Easy. If you want to add *"Use SSL 2.0 compatible ClientHello format"*
    Add this line:
    deployment.security.SSLv2Hello=true
    Maybe you want to disable Java update (which is a big problem for enterprises)
    Add these lines:
    deployment.javaws.autodownload=NEVER
    deployment.javaws.autodownload.locked=
    Below is a basic AutoIt script you could use (It compiles the files into the executable. When you compile the script the two Java files must be in the directory you specify in the FileInstall line, which can be anything you choose. It will also create your directory structure):
    #NoTrayIcon
    #RequireAdmin
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    Func _JavaConfig()
         $ConfigFile_1 = @TempDir & "\deployment.properties"
         $ConfigFile_2 = @TempDir & "\deployment.config"
         FileInstall ("D:\My Documents\Autoit\Java config\deployment.properties", $ConfigFile_1)
    FileInstall ("D:\My Documents\Autoit\Java config\deployment.config", $ConfigFile_2)
         FileCopy($ConfigFile_1, @WindowsDir & "\Sun\Java\Deployment\", 9)
         FileCopy($ConfigFile_2, @WindowsDir & "\Sun\Java\Deployment\", 9)
         Sleep(10000)
         FileDelete(@TempDir & "\deployment.properties")
         FileDelete(@TempDir & "\deployment.config")
    EndFunc
    _JavaConfig()
    Now if you have SCUP and have setup Self Cert for your organization, you just need to create a SCUP update for JRE.
    Edited by: 897133 on Nov 16, 2011 4:53 AM

  • How to convert XPS file to a PDF one via Adobe Acrobat XI Pro with command line?

    Hello,
    How to convert XPS file to a PDF one via Adobe Acrobat XI Pro with command line?

    It is not good. If I need to export some hundred of separate *.XPS files to hundred separate *.PDF files, I need to do this manually with each file. It is stone age.

  • Launch executable with command line arguments

    I have a programmer that I need to launch in my cvi code.  I tried the system command and lauchexecutable command but cannot get the programmer to lauch correctly.  If I run it from the command prompt or create a windows shortcut it works fine.  Here is the shortcut I created:
    C:\TPD\SAVS20P3\asix\up\up.exe /e c:\tpd\savs20p3\q33.hex/erase /q /p
    I'm trying to run the up.exe software with /e c:\tpd\v20_hex\v20.hex /erase /q /p as the command line paramters.
    I tried the following code which created the above path with command line
     strcpy(filename,"C:\\tpd\\savs20p3\\asix\\up\\up.exe /e c:\\tpd\\savs20p3\\hex_ee\\");   ///e c:\\tpd\\savs20p3\\hex_ee\\"");
      strcat(filename, hfile);//hex file name will change dynamically
      strcat(filename, "/q /p");
    I then tried LaunchExecutable(filename) and system(filename).  The system functions gives an error.  Its trying to lauch the /e c:\tpd\v20_hex\v20.hex file
    any suggestions.  I beieve its a simple syntax error.

    Well, apart evident typos in the code you posted, which is not creating the command line you stated, I can only think that before "/q" you should add a space to separate the option from the filename.
    This code should create the correct command line:
    strcpy (hfile, "c:\\tpd\\v20_hex\\v20.hex");
    strcpy (filename, "C:\\tpd\\savs20p3\\asix\\up\\up.exe /e ");
    strcat (filename, hfile);
    strcat (filename, " /erase /q /p");
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Can I add a New Folder to existing Business Area with Command Line?

    Hi,
    Can I add a New Folder to existing Business Area with Command Line in Discoverer (java or executable)? I am trying to do this with /load...
    /connect walkep_apps/walkep@smpdev1
    /load Visualizations /eul walkep_apps /user smp_naps_apps /object VISUAL_20K /capitalize /remove_prefix /insert_blanks
    /aggregate DETAIL /show_progress
    ... but this creates a new business area, "Visualizations 1", which is not what we want! We want to add the VISUAL_20K to the existing "Visualizations" business area. Many thanks in advance.
    Phil

    Bang on. thanks
    three's always an obvious solution.
    I'll post another question about how to attached a file into a Mail message which is automatically compressed/zipped. Or do i have to find the file in Finder, compress it and then attached it?

  • How To Run An External .exe File With Command Line Arguments

    Hiya, could anyone tell me how I can run an external .exe file with command line arguments in Java, and if possible catch any printouts the external .exe file prints to the command line.
    Thanks.

    Using the Runtime.exec() command. And read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How do I allow network volumes with the latest iMovie 10.0?

    How do I allow network volumes with the latest iMovie 10.0? The old "defaults write -app iMovie allowNV -bool true" doesn't work anymore.

    So, apparently, while iMovie is open, I have to EJECT the Net Drive.  When I remount it, iMovie immediately picks it up.
    That said... the update leaves much to be desired.  Many of the Projects have unlinked video (even though the same update using a Firewire HD shows the video linked).
    Message was edited by: BradNet

  • SQL Server 2008 Express Installation with command line options , FAILED.

    HI,
    I Have SQL Server 2005 Express instances on my PC. Now i am trying to install 2008 Express edition with Advance Services(Reporting.)
    I am trying to install the SQL Server 2008 Express with command line Options.
    /qs /Action=Install /Hideconsole /SecurityMode=SQL /Features=SQL,Tools,RS /InstanceName=XXXXXX /SAPWD="StrongPassword" /SQLSYSADMINACCOUNTS="Builtin\Administrators" /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /RSSVCACCOUNT="NT
    AUTHORITY\SYSTEM" /BROWSERSVCSTARTUPTYPE=Automatic /TCPENABLED=1 /NPENABLED=1
    But installation exits. It says the previous version 2005 tool are already exists, Remove them to Continue the 2008 Server Installation.
    please suggest me how to avoid that check and continue installation by replacing the older tool with 2008 automatically.
    regards 
    Pratap M:)

    Have you found any error in event logs?
    In my case even after uninstalling all 2005 related components it didn't worked. I had to resort to a brute force way and
    remove following registry keys
    32 Bit OS: HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90
    64 Bit OS: HKLM\Software\Wow6432Node\Microsoft\Microsoft SQL Server\90
    Check below threads
    http://stackoverflow.com/questions/175881/sql-server-express-2008-install-side-by-side-w-sql-2005-express-fails
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5fc58507-9f40-4213-acbd-32a57c8822d7/cant-uninstall-sql-server-2005-express-tools?forum=sqlsetupandupgrade
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • Import biar file with command line

    Hi
    I am trying to import biar file with command line on unix environment with BOXI R3.1 and Oracle DB
    The biar file include one universe and it's connection (eFashion), one report and one user
    when I run the command line:
    java -jar /BO/boxi/bobje/java/lib/biarengine.jar /BO/boxi/test.properties
    I recive the following error:
    Failed to commit objects to server : Undefined Info Store error
    An error occurred at the server during security batch commit:
    Request 6 of type 36 failed with server error : Object not found (1433)
    Request 11 of type 36 failed with server error : Object not found (1433)
    Request 20 of type 38 failed with server error : Object not found (1433)
    Request 26 of type 38 failed with server error : Object not found (1433)
    Do you have any idea , what is the problem?
    Thank you

    Hi Denis
    I found out after I create a biar file ,with only the user, through a command line. that the user did import since it was in a concurrent connectiontype , a type that not exit in the target environment.
    But after I fix this in the source environment and saw that a biar file with only the user is loaded , I recreate the biar file with all the objects as before (user, universe, report , folder) and I still got the same error message as before.
    So now I try to create the biar file with all those object through the command line. and I get a new errer message "Required dependencies not found on target system : '[AZK_.9sbf_lMgdQRpsbZfVw]"
    I check it , and understand that the object is the report , but I do not see what missing..... : (
    Those are the quries in the properties file:
    exportQuery= SELECT * FROM CI_APPOBJECTS where si_kind = 'Universe' and si_name='eFashion'
    exportQuery= SELECT  * FROM CI_APPOBJECTS WHERE SI_ID in ( 894,926)
    exportQuery= SELECT * from CI_SYSTEMOBJECTS WHERE SI_KIND = 'user' and SI_Name='repadmin'
    exportQuery= SELECT * FROM CI_INFOOBJECTS WHERE si_kind= 'Folder' and SI_name = 'test'
    exportQuery= SELECT * FROM CI_INFOOBJECTS WHERE      SI_ID IN (2188)
    Can you tell what is missing?

  • 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:

  • Network volumes with the same name

    Hi everybody.
    I recently got a Mac at the office. Yay! But I have an issue with network volumes. There are several machines I need to connect to using smb/cifs. Two of our development servers (Linux servers using smb/cifs) are configured to share each user's home directory. Naturally, my user name on both machines is the same, and therefore so is the name of the smb share. Unfortunately, MacOS X uses the share name as the volume name when it connects. This means I have two volumes with the same name, so I can't make any aliases or have any quick access to them. That's because aliases resolve to the first of them which was mounted, regardless of which of them they were made to originally.
    Other people in the office use Windows to access the shares, which poses no problem because in Windows you either give the full path of the share (including host name, which makes the paths distinct), or map a distinct drive to the share. I also mount them from my Linux, but on Linux you explicitly give the mount point, and thus make it distinct.
    Any way to make the volumes distinct on the Mac? Otherwise to make aliases resolve correctly in such a setup?

    there are several ways you can deal with this. first, you can use command line mount_smbfs command. it does let you specify a mount point. you can easily automate the process of creating a mount point and mounting the share using automator so you don't have to do it by hand every time. and you can also add the automator workflow to mount the shares to your login items. then it will happen automatically on every login. lastly, you can use autofs or add entries to /etc/fstab to automount the smb shares on startup. both methods let you specify mount points too. see this link for details
    http://rajeev.name/2007/11/23/autofs-goodness-in-apples-leopard-105-part-ii/

  • Backup user account with command line

    I am trying to set up a command line script (bash alias, actually) that will let me backup my entire user account to an externa firewire. Right now I am using
    rsync -a -u --delete --stats /Users/me /Volumes/FW_Backup/me/
    but I get about 500 meg less data at the destination as I have at the source and I get a command line response saying that some files could not be copies for permissions reasons.
    Would it fix things to run this command under Sudo or is there a better way to be sure I have a complete clone of my user account syncronized whenever the command is run (I am aware that there are multiple GUI resolutions to this but prefer to use the free native tools so I can roll it out to multiple Macs).

    I did try that but if I recall properly you wind up with other permissions problems - in the case of root not having permissions to the user. So I simply excluded the troublesome paths:
    code
    rsync -a -u --exclude Library/Caches/ --exclude Library/Preferences/ --delete --stats /Users/Richard /Volumes/rich_backup/
    And that has worked, but now I have a new problem: if the network share is not mounted, rsync will simply create the directory /volumes/rich_backup on the hard disk and rsync to it! This is a obviously a problem should I or other users forget to mount the network share intended for backup. So I need to figure out how to get the command to error out if the network share is not present. I tried to begin the script with
    code
    ls /volumes/rich_backup &&
    in order to get it to error out if the share was not present and it worked on my Tiger system, but on a customer's Panther system the script does not error out! Can anyone help me with some code that will intentially break my backup script if the destination volume is nor present?
    Dual 2.7 PowerMac Mac OS X (10.4.2)

  • Mount network volume: different users same credentials, see different shares

    A set of network volumes on a NAS need to periodically be backed up to a local USB disk. Manually, I can mount most shares (from a Finder window). In a shell script I can list all files due (find) and use that list for backing up to a local USB volume (cpio). So far so good. However, I need to mount these network volumes first. The mount command doesn't seem to work for me.
    How do I mount a network volume in a shell script?
    Also I noticed that if under fast user switching user A logs in with credentials uName and uPassword, the NAS shows 6 shares to choose from. When user B on the same machine logs in with the same credentials uName and uPassword, only 5 shares are visible and one is not shown. It looks as if the credentials do not uniquely determine the volumes offered for mounting. Also, when user B mounts a share, it appears to be owned by user A (who is logged in but has not mounted any share on the NAS) rather than owned by B or by uName...
    How do I mount this volume as user uName rather than A or B?
    How can one uniquely determine the identity of the volume? Network volumes don't show UUIDs and the name given in the /Volume/ folder can change, as is discussed in message 11871367.

    eljonco wrote:
    I just checked: after a reboot, user A logs in (automatic login enabled), user A logs out, user B logs in, ls -a /Volumes only shows local HD and a USB HD. No network mounts there.
    In the finder window, the NAS shows up on the left. Clicking it and entering credentials uName, uPassword, a list of five, not 6, items is offered for mounting. So your options 1 and 4 are then ruled out, unless an alias made by user A and copied to user B's home folder would still link to user A's mounting options.
    Actually, only option 1 is ruled out. That Finder list is simply not reliable. It is likely cached somewhere and could be restored by deleting some hidden preference file. It regularly causes people to freak out when they see some sharepoint listed on a network that they have long since left.
    If you did Go > Connect to Server in the Finder and typed in the location, you could still create an alias.
    Once mounted one of 5 shares as uName with uPassword, an ls -al /Volumes shows the local drives and
    drwx------@ 11 B staff <date> sharename
    and all folders in sharename also show B:staff as user:group. I find that strange, as I did not log in to the share with credentials B, but with credentials uName. Anyhow.
    The uName user is for the network share. When MacOS X mounts that, it gives it permissions appropriate for the user who did the mounting. If you did an NFS mount as root, the server would handle permissions via UNIX uid and gid. I'm really not familiar with the details of AFP.
    As I read in a post about autoFS that 'cd /Volume/theHiddenShare' should magically mount that share, I gave it a shot. Alas, '/Volumes/theHiddenShare: No such file or directory'. Same long shot in the dark in the 'Go/Connect to' dialog gave 'The folder cannot be found'. Not surprisingly, I suppose.
    Yes. That has to be setup
    Here is what I've done to my /etc/auto_home:
    # Automounter map for /home
    #+auto_home     # Use directory service
    # Get /home records synthesized from user records
    #+/usr/libexec/od_user_homes
    myserver.org -allow_other,reconnect,fstype=sshfs [email protected]:/home/me_remote
    I'm not on a big network, so I've disabled the system functionality by commenting out "+auto_home" and "+/usr/libexec/od_user_homes". Now, the system doesn't manage /home and I am free to do with it what I want. This will mount the path "/home/myserver.org" connected to the "me_remote" user on "myserver.org". I'm using the funky MacFUSE sshfs filesystem. Your AFP file system should work much better. Your line would look something like this:
    drive5 -fstype=afp uUser@MyLocalServer:/theHiddenShare
    Run "automount -vc" to reset your automount system.
    Next use Finder Go > Connect to Server and type in "afp://uUser@MyLocalServer:/theHiddenShare".
    You want to mount the drive once so that you can store uPassword in your keychain.
    Now unmount the drive.
    The Finder mounts all go into /Volumes and, as you have discovered, can get themselves confused. This automount will be at "/home/drive5". All you have to do is enter that folder in the Finder and it will be automatically mounted. If you haven't used it for a while, it will be unmounted automatically.
    You may have to play around with this a little. I don't have any network AFP share that I need to mount on a regular basis, so those parameters may need to be adjusted somewhat.

  • Disconnecting network volume with Lion

    hi,
    Since 10.7.4 I pass a lot of problems.
    Especially network problems with my Synology NAS.
    Occasionally my volumes are ejected himself. I have this error in the console:
    Finder [143] :: NetworkNode ejectCallBack Returned -47
    With preview I also have problems opening some pdf (not all!). He opens the file and then ejects all volumes networks!
    Here is the error message:
    ([663]): Preview(663) deny system-fsctl
    Preview[663]: Failed to get user access for mount /Volumes/Bureautique
    sandboxd[668] ([663]): Preview(663) deny system-fsctl
    KernelEventAgent[53]: tid 00000000 received event(s) VQ_DEAD (32)
    KernelEventAgent[53]: tid 00000000 type 'smbfs', mounted on '/Volumes/Bureautique', from 'Bureautique', dead
    KernelEventAgent[53]: tid 00000000 force unmount //Bureautique from /Volumes/Bureautique
    KernelEventAgent[53]: tid 00000000 found 1 filesystem(s) with problem(s)
    Failed to get user access for mount /Volumes/BureautiquePreview[663]: NSTrackPersistentURLs: LSSharedFileListInsertItemURL() failed at inserting URL file://localhost/Volumes/Bureautique/boot_camp_install-setup_10.7_f.pdf
    I have no problem with adobe reader.
    I obviously made ​​a big household with Onyx but this does not change.
    Would you have an idea of the problem?
    Thank you.

    Unfortunately not. But it is clearly a bug Apple.

Maybe you are looking for

  • How do i change my imessage account on the MacBook Pro?

    i'm having major problems with my iphone, so i'm using my macbook pro and unfortunately my fiance is in another continent at the moment and can't help me lol but ihave no idea how to switch imessage accounts on the laptop please help!

  • How do I change the style of text in an HTML Snippet?

    Hello everyone, I'm using an HTML snippet with an iFrame tag in it. What formatting code do I include in the snippet so that the style of the text is the same as that of the default text object for the particular iWeb theme I'm using? Much obliged, G

  • Login with user name

    Logged out and back in on the old forum.(this forum) Followed the prompts to migrate account. However, when I log into the new forum my MM user name shows. Yesterday I was logged in to the new forum under my old name.

  • Scenario 4 - Prioritizing deliveries

    Acme Co. is running a Renewal e-mail campaign that is triggered by the Inventor's Club renewal date. They want to make sure that anyone who has received in their Inbox the Renewal delivery within that past two weeks is not targeted by any other deliv

  • "Installer Failed To Initialize"? After Effects CS5 Mac, Help!!!

    I'm in serious need of some help here. I downloaded the After Effects CS5 trial, but when I go and try to install it I get an error: "Installer Failed To Initialize. Please Download Adobe Support Advisor To Detect The Problem" I already tried Adobe S