Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the smbfs tools package to mount my SMB shares. I wrote a quick script to mount the share:

/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?

share|improve this question
Did you find an answer to this? – user10194 Feb 4 '11 at 12:27
up vote 1 down vote accepted

See this bug in Ubuntu:

and the related bug in Debian:

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.

share|improve this answer
ah, ok, bummer for me! – Petriborg Jan 3 '11 at 15:11

For me, adding the sec=ntlmv2 parameter works.


sudo mount //server/share /localdirectory -o user=username,domain=WORKGROUP,sec=ntlmv2,iocharset=utf8
share|improve this answer

Did you previously customize the smb.conf? If not, has the Windows system you're connecting to changed its configuration since the last time you connected? One possible solution: Add the following in your /etc/samba/smb.conf

client ntlmv2 auth = yes

share|improve this answer
Nope the windows box is unmodified, the only difference was the update to Ubuntu. I'll give the configuration change a test. – Petriborg Dec 16 '10 at 17:39

Your Answer


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.