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

share|improve this question
    
Did you find an answer to this? –  user10194 Feb 4 '11 at 12:27
add comment

3 Answers

up vote 1 down vote accepted

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.

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

For me, adding the sec=ntlmv2 parameter works.

Example:

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

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
add comment

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.