Stuck Trying To Mount CIFS In /etc/fstab

Discussion in 'Linux/BSD/Free Systems' started by svet-am, Mar 31, 2012.

  1. svet-am

    svet-am [H]ardness Supreme

    Messages:
    5,149
    Joined:
    Jan 6, 2003
    I have a bunch of public shares (no username, no password) hosted on a Windows 7 Ultimate box on my network

    From CentOS 5.8, I can mount them manually just fine using this:

    Code:
    mount -t cifs //atlanta/binaries /resources/atlanta_binaries/ -o user=guest,password=""
    
    If I try to make the same thing happen in /etc/fstab, I change the syntax to this

    Code:
    //atlanta/binaries /resources/atlanta_binaries guest,_netdev,rw 0 0
    
    In this mode, all I see is:

    Code:
    mount error 13 = Permission denied
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
    
    Like I mentioned, this works when I mount manually, so I know I can ping the host by name and I can access the shares. I just need to figure out how to do it with fstab since I have about five others shares I _also_ need to access this way.

    I've spent quite a bit of time today twing to get this sorted out and now I'm just frustrated. Am I missing something obvious? I've hit just about every hit in the google searches and while they have good information, none have helped me.
     
  2. 4saken

    4saken [H]ardForum Junkie

    Messages:
    10,774
    Joined:
    Sep 14, 2004
    //atlanta/binaries /resources/atlanta_binaries cifs guest,_netdev,rw 0 0

    ?


    I mount my cifs identical to the above on CENTOS.


    Do you get the same error if you mount via fstab once booted?
     
  3. svet-am

    svet-am [H]ardness Supreme

    Messages:
    5,149
    Joined:
    Jan 6, 2003
    thanks for the tip -- that was a goof on my part when I was typing up the lines for the forum post. I already have the cifs section on my mount line in the fstab.

    It's not blocking boot, but the mounts don't get mounted and then I see the permission denied error message I noted above in dmesg.
     
  4. 4saken

    4saken [H]ardForum Junkie

    Messages:
    10,774
    Joined:
    Sep 14, 2004
    I mean if you just try to mount the mount point which would use the fstab config do you still get the error after boot?

    mount /resources/atlanta_binaries

    that would at least narrow out something off in the fstab.
     
  5. svet-am

    svet-am [H]ardness Supreme

    Messages:
    5,149
    Joined:
    Jan 6, 2003
    as I noted in my OP, that works perfectly (in fact, I'm using it _right now_ to copy some files) which is why I'm confused that it's not working in fstab.
     
  6. squishy

    squishy [H]ard|Gawd

    Messages:
    1,204
    Joined:
    May 25, 2006
  7. svet-am

    svet-am [H]ardness Supreme

    Messages:
    5,149
    Joined:
    Jan 6, 2003
    thanks, I hadn't seen that. I've tried both _with_ and _without_ the credentials file. I'll give autofs a try.
     
  8. 4saken

    4saken [H]ardForum Junkie

    Messages:
    10,774
    Joined:
    Sep 14, 2004
    curious if you figured out your issue.
     
  9. svet-am

    svet-am [H]ardness Supreme

    Messages:
    5,149
    Joined:
    Jan 6, 2003
    nope -- for now I'm just doing a manual mount. I won't have time to try again until this weekend.