Linux Mapping a NTFS network drive in Ubuntu

Discussion in 'Software' started by Brooxy, 11 Mar 2010.

  1. Brooxy

    Brooxy Loser of the Game

    Joined:
    20 Apr 2006
    Posts:
    2,093
    Likes Received:
    109
    as a linux n00b, I'm having another go with the latest full Ubuntu build. Most of the system runs without a hitch, but I have one problem.

    90% of my music is stored on a Windows 2000 server box. Simple file sharing is enabled (on an NTFS drive), and the guest account has full access. (as of yet it's not doing a local domain - simple shares)

    Problem I have is getting the linux os to pick it up so I can import it into Amarok. I've had a look round the net, and I've found some bits, but they make as much sense to me as politics.

    rep to the first person who can break linux forums down to simple speak, and help me get this running. Not sure if it helps, but the server share name in windows is:

    \\sfmp01\music
     
  2. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    use su to take root, then

    # mkdir -p /mnt/mymedia
    To create a mount point (if neccesary)

    # mount -t cifs //sfmp01/music /mnt/mymedia

    Make sure the mount point is what you want to be called.

    You can check it's worked with

    # cd /mnt/mymedia; ls -l

    to list the files in the directory.
     
  3. Brooxy

    Brooxy Loser of the Game

    Joined:
    20 Apr 2006
    Posts:
    2,093
    Likes Received:
    109
    Not working as of yet. the first command worked and created the /mnt/music folder, but on trying the second step I get the below:

    Usage: mount -V : print version
    mount -h : print this help
    mount : list mounted filesystems
    mount -l : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
    mount -a [-t|-O] ... : mount all stuff from /etc/fstab
    mount device : mount device at the known place
    mount directory : mount known device here
    mount -t type dev dir : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
    mount --bind olddir newdir
    or move a subtree:
    mount --move olddir newdir
    One can change the type of mount containing the directory dir:
    mount --make-shared dir
    mount --make-slave dir
    mount --make-private dir
    mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
    mount --make-rshared dir
    mount --make-rslave dir
    mount --make-rprivate dir
    mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using -L label or by uuid, using -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say man 8 mount .
     
  4. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    Try sudo apt-get install smbfs before doing the mount again.
     
    Brooxy likes this.
  5. Brooxy

    Brooxy Loser of the Game

    Joined:
    20 Apr 2006
    Posts:
    2,093
    Likes Received:
    109
    Ahhh that did it, thanks a lot. rep to you kind sir :)
     
  6. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    No problem at all, but don't get too excited yet. I'm assuming you want this share to automatically reconnect when you restart the machine?

    # sudo cp /etc/fstab /etc/fstab.bak
    # gksu gedit /etc/fstab


    Backup and then edit fstab.

    Add a line at the bottom:

    //sfmp01/music /mnt/music cifs guest,rw,noexec 0 0

    Then I'm afraid you'll need to reboot to test it. I'm pretty sure that should auto-mount the drive when the machine starts and give you read and write access. it might be a bit funny without providing credentials, so we'll try this first before messing with fmask and dmask stuff.
     
  7. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    You are not working on windows... no need to reboot

    Code:
    sudo mount -av
     
  8. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    I knew I was forgetting something.

    And yes, I work mostly on Windows - it's been a long time since I dabbled in bash.
     
  9. Brooxy

    Brooxy Loser of the Game

    Joined:
    20 Apr 2006
    Posts:
    2,093
    Likes Received:
    109
    All sorted now - have put the new lines in, and done a reboot just to test it post start, and all seems to be good. Thanks :)
     

Share This Page