Results 1 to 6 of 6

Thread: Unable to permanently mount shared folders

  1. #1
    Join Date
    Mar 2012
    Beans
    2

    Unable to permanently mount shared folders

    Within our network, we're running a Windows 2008 server, Ubuntu server v11.10, and several Windows 7/XP workstations.

    We are having trouble sharing folders/files that are hosted on the Ubuntu server. I'm able to create a shared folder manually by selecting the folder and configuring the shared options. After creating the shares, other computers can access the data.

    The issue starts whenever the server reboots.

    After the server restarts, we have to reconfigure the shared folders again.


    I'd like to find a way to mount the shared folders during the boot process. To date, I added the follow command to rc.local file:

    sudo mount -t cifs -o username=root,password=XXXXXX //192.168.1.11/ms_SHAREname /media/FC503CC8503C8C00/FOLDERName

    The problem is the shared folders do not mount correctly and/or the other computers can not access these shares. Please let me know that we're missing...

    Thanks.



  2. #2
    Join Date
    Feb 2011
    Location
    Maryland
    Beans
    2,254

    Re: Unable to permanently mount shared folders

    make credentials file

    put it in /root

    name it .sharecred

    Contents as follows...

    username=DOMAIN\User
    password=PASSWORD

    Edit /etc/fstab

    //192.168.1.11/SHARE /media/FC503CC8503C8C00/FOLDERName smbfs credentials=/root/.sharecred,gid=1901,iocharset=utf8,file_mode=0777,dir_mode=0 777 0


    type mount -a to mount it.

    It will now mount after every reboot automatically.

  3. #3
    Join Date
    Dec 2009
    Beans
    5,611

    Re: Unable to permanently mount shared folders

    Maybe it's me but I'm reading 2 different questions in your post.

    Problem 1:
    We are having trouble sharing folders/files that are hosted on the Ubuntu server. I'm able to create a shared folder manually by selecting the folder and configuring the shared options. After creating the shares, other computers can access the data.

    The issue starts whenever the server reboots.

    After the server restarts, we have to reconfigure the shared folders again.
    Your description sounds like you are using Nautilus to create the share. Nothing wrong with that but are the shares actually gone or is it that the folder icon indicates that it is not shared? Nautilus doesn't keep the share emblem on the icon very well so it may still be shared. One way to make sure though is after the next reboot run the following command to get a listing of the shares:
    Code:
    net usershare info --long
    Problem 2:
    I'd like to find a way to mount the shared folders during the boot process. To date, I added the follow command to rc.local file:

    sudo mount -t cifs -o username=root,password=XXXXXX //192.168.1.11/ms_SHAREname /media/FC503CC8503C8C00/FOLDERName
    1st, if it's in rc.local then it will be run by root so get rid of the sudo.

    Another way is to put it in fstab like collisionystm showed you ( although I'm not sure what group 1901 is ).

    2nd, from your description all of you clients to this server are Windows. What is it you are trying to mount? A share on one of the Windows clients?

    I get confused a lot so maybe I'm not reading your post correctly.

    EDIT: You know, maybe this is the clue from your cifs mount statement:
    /media/FC503CC8503C8C00
    That's an ntfs partition that you are mounting and based on that mountpoint it looks like you are mounting this manually at every reboot. Is the problem that you want to have that partition automount? That might be the cause of Problem 1. That's easy to do since we already know it's UUID:

    [1] Unmount the partition:
    Code:
    sudo umount /media/FC503CC8503C8C00
    [2] Create a mount point:
    Code:
    sudo mkdir /media/Something
    [3] Add the following line to fstab:
    Code:
    UUID=FC503CC8503C8C00 /media/Something ntfs defaults,nls=utf8,umask=000 0 0
    [4] Then run the following command to test for errors and mount the partition:
    Code:
    sudo mount -a

  4. #4
    Join Date
    Mar 2008
    Location
    Queensland Australia
    Beans
    664
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Unable to permanently mount shared folders

    The other question I would ask is, why does the Ubuntu server reboot so often ? I would imagine the server should be running for quite a while.

    My other two cents worth is you may still have to have a batch file on your workstations to remap the server drive on a regular basis.

    regards

  5. #5
    Join Date
    Mar 2012
    Beans
    2

    Re: Unable to permanently mount shared folders

    Collisionystn,

    Thanks for your replay. After adding the mount statement to /etc/fstab:

    //192.168.1.11/ms_music /media/FC503CC8503C8C00/music smbfs credentials=/root/.sharecred,gid=1901,iocharset=utf8,file_mode=0777,dir_mode=0 777 0

    I receive the following:

    root@server:~# mount -a
    Retrying with upper case share name
    mount error(6): No such device or address
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


    Suggestions?

    Thanks again

  6. #6
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    12,462
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Unable to permanently mount shared folders

    I might be reading this wrong, but in the first post you say you are having trouble mounting shares hosted on the Ubuntu Server.
    Then why are you trying to mount cifs msShareName???

    And as already mentioned, don't try to mount things at /media/UUID. That's where they get mounted by default, for example when plugging in a usb hdd. Create a folder /media/foldername and use that as destination mount point.

    EDIT: One more idea: open terminal and try the mount command there first. It will show you errors if something is missing. Once you get the mount command working, it's easy to figure out what to put in /etc/fstab. But again, if the shares are on the ubuntu server, I have no idea why are you trying with mount cifs. It would be something like:
    mount /dev/sda5 /mountpoint
    Last edited by darkod; March 27th, 2012 at 11:01 PM.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 7 Ultimate 64bit

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •