smbmount returns "operation not permitted"
Solution 1
See this bug in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/563805
and the related bug in Debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571323
This is an intentional change in behaviour for security reasons. Instead of using mount with the setuid bit set you might want to run it using sudo.
Solution 2
For me, adding the sec=ntlmv2
parameter works.
Example:
sudo mount //server/share /localdirectory -o user=username,domain=WORKGROUP,sec=ntlmv2,iocharset=utf8
Related videos on Youtube
Petriborg
Python, Java, and C/C++ hacker. Currently hacking on payment systems running on Linux and Solaris. Stackoverflow.
Updated on September 17, 2022Comments
-
Petriborg over 1 year
I use the smbfs tools package to mount my SMB shares. I wrote a quick script to mount the share:
#!/bin/sh /usr/bin/smbmount "\\\\somehost.local\\hostshare" /media/hostshare -o user=smbuser,dom=WORKGROUP,uid=localuser,gid=localgroup
This script used to work in 9.10 when called by the "localuser" account, but in my fresh-installed 10.04 it fails giving me the error:
mount error(1): Operation not permitted Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
The /media/hostshare directory is empty and has these perms:
drwxrwxr-x 2 localuser localgroup 4096 2010-12-12 12:04 hostshare/
The "localuser" is in these groups:
localgroup adm dialout cdrom plugdev lpadmin admin sambashare
Any idea what is going on here? Google seems to suggest that the "sticky" bit needs to be set on
/sbin/mount.cifs
/sbin/mount.smbfs
and/sbin/umount.cifs
Is this a bug?
-
Admin over 13 yearsDid you find an answer to this?
-
-
Petriborg over 13 yearsNope the windows box is unmodified, the only difference was the update to Ubuntu. I'll give the configuration change a test.
-
Petriborg over 13 yearsah, ok, bummer for me!