Projects | Downloads | Tickets | KnowledgeBase | Forums | About | Search
Load:0.00 0.00 0.00
Sessions: 22
Login
User:
Pass:
Remember login:
New User | Lost Password

Case[1162]: Linux, Samba, cifs mount, Permission denied

Printable View
Case
Title:Linux, Samba, cifs mount, Permission denied
Number:1162
Created:03/26/2009 11:31
Created By:bemowski
Page Views:6704
Status: ACTIVE
Approver:unassigned
Keywords:
Related Tickets:
Detail

This is infuriating.

I have 2 fedora boxes - one running Samba, the other trying to mount via cifs. I've created a totally open share - with every concievable samba option that says "let everyone in and do everything". Here:

[test]
        path = /data/test
        writeable = yes
        browseable = yes
        guest ok = yes
        force user = nobody


So - the rest of the smb.conf was the default stuff that comes with the samba install on fedora 9. I added some options after the system-config-samba - trying to make it more open.

Now, here is a long series of mount failures:
root@flask:/mnt>mount -t cifs -o guest //sailor/test sailor
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
root@flask:/mnt>mount -t cifs -o guest,user=foo //sailor/test sailor
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
root@flask:/mnt>mount -t cifs -o user=foo //sailor/test sailor
Password: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

root@flask:/mnt>tail /var/log/messages
Mar 26 11:04:05 localhost kernel: CIFS VFS: Send error in SessSetup = -13
Mar 26 11:04:05 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -13
Mar 26 11:04:15 localhost kernel: Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Mar 26 11:04:15 localhost kernel: CIFS VFS: Send error in SessSetup = -13
Mar 26 11:04:15 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -13
Mar 26 11:07:23 localhost kernel: Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Mar 26 11:07:23 localhost kernel: CIFS VFS: Send error in SessSetup = -13
Mar 26 11:07:23 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -13

In short, nothing worked. Googleing did not find much.

Ok: what a pile of shit. This is why linux can't get users. The simplest thing takes hours to figure out. Fedora is worse than many on this front - but this particular problem didn't really seem to be specific to any distro.

Here is a supposedly definitive FAQ on CIFS mounting: no help.
http://www.swerdna.net.au/linhowtosambacifs.html
The problem is - in the begining they talk about CIFS mounting, and in the end they talk about unsecured samba shares - but what they don't say is that CIFS cannot mount the unsecured samba share!!!

Solution:
Finally, I found this samba bug report:
https://bugs.launchpad.net/samba/+bug/98658

Ok - here's the secret, and seemingly undocumented trick:
root@flask:/mnt>mount -t cifs -o sec=none //sailor/test sailor
root@flask:/mnt>cd sailor/

Solved - only took 2 hours to mount an insecure share with CIFS. That should have taken 2 minutes.

Add Comment


Show System Notes
User Date Comment
anonymous 07/28/2010
22:44
2 hours? You clearly didn't check the man page for mount.cifs, did you? You would have figured out a workaround in 2 minutes, or less.

What you encountered was a simple bug that leaked out but was promptly fixed. If you don't want to deal with troubleshooting or simply are unable to, then I recommend switching to a less bleeding edge distro. Fedora, for example, is basically the testing ground of new and upgraded stuff for RedHat. The same is true between Ubuntu and Debian.

As an example I run a small, old laptop as a file/print/scanner/download server. It's not my main computer. In fact, I barely ever touch it so I want stability. So I run Debian on it. Debian releases updates only when necessary and only ones that have been tested, i.e. in Ubuntu.

I run Ubuntu on my main machine and I'm always messing around with stuff but it doesn't matter because I have my /home on a separate partition. So if anything goes very horribly wrong, I just reinstall the OS and mount /home with all my stuff.
anonymous 02/19/2010
17:49
Thank you. In case anyone uses /etc/fstab , I got it working by adding a line like this
//sailor/test sailor cifs guest,sec=none

And running
# mount //sailor/test

You might have to play with the permissions you want though.
anonymous 02/07/2010
00:08
Wow thanks this look me hours to figure out as well. It was your instructions that finally worked! I agree about this being a POS!
Copyright 2003-2007, JMatrix International