If you are using Dapper, Brezzy or Hoary you may encounter similar problems when dealing with Win2k3 shares. I got the following error when trying to mount a share using smbfs:
# mount -t smbfs //server/share /mnt -o username=user
cli_negprot: SMB signing is mandatory and we have disabled it.
21041: protocol negotiation failed
SMB connection failed
This is because your smbfs version does not support the default Win 2k3 encryption scheme. There is a simple workaround:
# mount -t cifs //server/share /mnt -o username=user
This always works for me when mounting the share as root. I decided to automate the process so I created a following fstab entry:
//server/share /mnt cifs rw,user,noauto,username=user,password=pass 0 0
Now mounting still works great when I’m root, but whenever I try to do it as a user I get the following:
$ mount //dc01/Public
mount error 1 = Operation not permitted
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
I solved one problem, but I found another. CIFS refuses to mount with user permissions. Any suggestions how to fix this?
Mookle Wilson posted this tip in the comments:
sudo chmod +s /sbin/mount.cifs
This should let you mount your cifs drives as a user.
[tags]smb, samba, windows, share, smbfs, cifs, linux, dapper[/tags]
As root: chmod +s /sbin/mount.cifs
THX Mookie!
I had the same problem and this fixed it!
Yup, Mookie’s suggestion worked for me too.
Unfortunately it didn’t work for me; I got
mount error: permission denied or not superuser and mount.cifs not installed SUID
Korinthe – do you get that message when mounting or when trying to do the chmod?
Do the chmod as root and then mount. That may fix the issue here.
Either that or you don’t have mount.cifs installed. See if it exists in your /sbin directory:
ls /sbin | grep cifs
If it’s not there you probably will need to instal the smbfs package. On redhat that should be possible via yum no?
Pingback: Terminally Incoherent » Blog Archive » Parsing Excel Files with Perl
I too had this problem
You have to set the right owner for the mount point
for example, about the command:
/mnt has to be owned by user:user_group
ps. remember to add suid to umount.cifs too
Good point. Actually, isn’t this the expected behavior? Every time I set up a read/write mount point outside of /home I usually chown it so that I’m the owner. It might not be best practice, but it doesn’t hurt.
I don’t think the the rw,user option in fstab overrides the normal file permission on your mount point directory, but I might be wrong…
I also had this problem, and discovered that somehow my mount point had become owned by root, despite it being in my user’s home directory, and created by the user. Not sure how the permissions had been changed, but changed them back to the user again and all was well.