Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a line in my /etc/fstab for ages that stopped working since 13.04:

//192.168.100.2/share   /mnt/popcorn      cifs username=MyUserName,password=MyPassword,user,gid=sambashare,file_mode=0664 0   0

and it gives me:

mount /mnt/popcorn
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

dmesg is as helpful as sunshine in the desert:

[  622.471321] CIFS VFS: Send error in SessSetup = -13
[  622.471458] CIFS VFS: cifs_mount failed w/return code = -13

I know the user/pass combo is correct, as this works fine:

bart@dosar:~$ smbclient //192.168.100.2/share --user=MyUserName
Enter nmt's password: 
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.32]
smb: \> ls
...

How can I permanently mount a CIFS/Samba share on Ubuntu 13.04 ?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

according to (https://wiki.ubuntu.com/MountWindowsSharesPermanently) should be:

//servername/sharename  /media/windowsshare  cifs  username=msusername,password=mspassword,iocharset=utf8,sec=ntlm  0  0

Try to look what you are doing wrong. Make it simple, remove the file_mode, user and gid, maybe the iocharset and sec variables as well. If this will work, add always one...

share|improve this answer
    
No such luck. Removed everything, still same error. –  Bart Friederichs Jun 27 '13 at 19:47
1  
Adding sec=ntlm fixed it. Thanks. –  Bart Friederichs Jun 27 '13 at 19:49
    
OT: 19 minutes to solve the issue, this looks like powefull community –  Dee Jun 27 '13 at 19:53

I have had this problem on various networks which needed samba filesharing services from an Ubuntu or LinuxMint-based file server.

In every case, while the user's samba account had a password and allowed browsing (and manipulating files) of a share through a file manager, fstab mounts did not work.

This is regardless of having set sec=ntlm or sec=ntlmv2 or sec=ntlmssp or any of the various other options typically offered as a "solution" (i.e. such as setting the file_mode or user or gid)

In every case the solution for our installations has ended up being the same: reset the samba user's password and the mount works, regardless of setting options!

I'm not sure what happens when the password is "inherited/converted" from the user's Linux account, but there seems to be a significant problem there, notwithstanding the ability to browse (not mount) a samba share.

I am now going to cross post this reply to a couple similar AskUbuntu posts which promote the same "answers" which often do not seem to help those with problems.

Perhaps this approach will help you with your fstab samba mounting challenge. I hope so and good luck.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.