Results 1 to 7 of 7

Thread: SOLUTION: Connecting to network shares

  1. #1
    Join Date
    Jan 2005
    Beans
    24

    SOLUTION: Connecting to network shares

    Gidday all,

    My skill level in this area amounts to "gormlessly follow the how-to guides", so if that's you too, this might be just what you've been looking for!

    Ever since installing Hardy I've been having no success mounting network shares at bootup correctly.

    When upgrading from Gutsy the existing fstab entries suddenly created weird permissions problems, where the drives would appear on the desktop, but their contents could not be displayed, or could but I was locked out of opening most of the contents.

    The solution has finally been FOUND. I didn't do this work (its in a bug report and elsewhere in the forums) but because I've seen so many people hunting for the answer I though reposting it might help somewhere.

    Most how-to guides you see here or elsewhere on the web (in my case the old "Unofficial Guide to Dapper") explain how to edit fstab and make an entry similar to this (in this case to mount a drive called "fred" located on a server at 192.168.0.100):-

    //192.168.0.100/fred /media/fred smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0

    The WORKING equivalent under Hardy is this:-

    //192.168.0.100/fred /media/fred cifs credentials=/root/.smbcredentials,rw,nounix,iocharset=utf8,file_mode =0777,dir_mode=0777 0 0

    The key changes are the use of the built-in cifs instead of the now-depreciated smbfs, and the apparently-essential "nounix" switch.

    Follow the rest of the normal instructions for creating the local mount folder (in this example "mkdir /media/fred"), creating the credentials file etc in exactly the traditional way.

    Good luck!

    Cheers,

    Tony
    Last edited by TonyS; May 20th, 2008 at 12:07 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

  3. #3
    Join Date
    May 2008
    Beans
    21

    Re: SOLUTION: Connecting to network shares

    Thanks TonyS. After numerous queries on numerous forums you have solved my Hardy problem. Interesting that my Desktop Hardy machine works without the 'nounix' option, but my laptop requires it.

    Initially I thought this resolved my problem - not so Laptop still will not connect to the share. mount -t cifs will connect successfully but neither mount.cifs nor your fstab solution will mount the share???
    Last edited by bobd72; June 2nd, 2008 at 12:34 PM.

  4. #4
    Join Date
    Nov 2005
    Beans
    522
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: SOLUTION: Connecting to network shares

    Thanks Tony, going a little batty trying to get a share mounted that worked perfectly in the last 4 versions of ubuntu!

  5. #5
    Join Date
    Jan 2007
    Location
    Cambridge, UK
    Beans
    44
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: SOLUTION: Connecting to network shares

    I've got the same problem, I can't get the Fstab server share to mount in Hardy.

    My fstab line is:
    //chef/sharename /media/sharename cifs guest,rw,nounix,iocharset=utf8, file_mode=0777, dir_mode=0777 0 0
    I get the error:
    CIFS VFS: cifs_mount failed w/return code = -22
    when I then try mount -a

    D'oh! Fixed the problem. The error code indicated that smbfs was not installed!

    John
    Last edited by SoundFriend; September 6th, 2008 at 05:15 PM. Reason: Fixed!

  6. #6
    Join Date
    Sep 2005
    Beans
    2

    Re: SOLUTION: Connecting to network shares

    Hello,
    I have the following problem, I can mount it ok, I wrote this on my fstab:

    Code:
    //server/www /media/www cifs rw,user,credentials=/root/.smbcredentials,iocharset=utf8,dir_mode=777,file_mode=777 0 0
    but I need normal user permissions to enter the /media/www
    as I can just access to /media/www with the root user

    Any help?
    Thanks in advance.

  7. #7
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: SOLUTION: Connecting to network shares

    Quote Originally Posted by gush View Post
    Hello,
    I have the following problem, I can mount it ok, I wrote this on my fstab:

    Code:
    //server/www /media/www cifs rw,user,credentials=/root/.smbcredentials,iocharset=utf8,dir_mode=777,file_mode=777 0 0
    but I need normal user permissions to enter the /media/www
    as I can just access to /media/www with the root user

    Any help?
    Thanks in advance.
    See the second link in my sig. In the troubleshooting section there are several fixes for "Files owned by root"

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
  •