Mounting Windown 2k3 Share in Ubuntu Dapper

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?

Update 03/22/2007 11:16:11 AM

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.

Related Posts:

  • Parsing Excel Files with Perl
  • I’m Upgrading to Dapper/Edgy
  • I got the Ubuntu CD’s!
  • Hoary to Dapper - Upgrade Log
  • Kubuntu Dapper on Inspiron 600m
  • Upgrading to Vim 7 on Dapper
  • Lenovo Linux Vote
  • Easy Way to Run IE under Wine
  • Finally, a linux distro for me!
  • Kubuntu 7.10 (Gutsy) on Dell Inspiron 600m

  • 9 Responses to “Mounting Windown 2k3 Share in Ubuntu Dapper”

    1. Gravatar Mookie Wilson UNITED STATES Says:

      As root: chmod +s /sbin/mount.cifs

      Posted using Mozilla Firefox Mozilla Firefox 1.5.0.9 on Fedora Linux Fedora Linux
    2. Gravatar snark SWEDEN Says:

      THX Mookie!
      I had the same problem and this fixed it!

      Posted using Mozilla Firefox Mozilla Firefox 2.0 on SuSE Linux SuSE Linux
    3. Gravatar Luke UNITED STATES Says:

      Yup, Mookie’s suggestion worked for me too.

      Posted using Mozilla Firefox Mozilla Firefox 2.0 on Ubuntu Linux Ubuntu Linux
    4. Gravatar korinthe UNITED STATES Says:

      Unfortunately it didn’t work for me; I got

      mount error: permission denied or not superuser and mount.cifs not installed SUID

      Posted using Mozilla Firefox Mozilla Firefox 1.5.0.9 on RedHat Linux RedHat Linux
    5. Gravatar Luke UNITED STATES Says:

      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?

      Posted using Mozilla Firefox Mozilla Firefox 1.5 on SuSE Linux SuSE Linux
    6. Gravatar Terminally Incoherent » Blog Archive » Parsing Excel Files with Perl UNITED STATES Says:

      […] First you will need to mount the network share on your box. Next you will need the Spreadsheet::ParseExcel package from CPAN. […]

      Posted using WordPress WordPress 2.0.5
    7. Gravatar Michele Bordi ITALY Says:

      Unfortunately it didn’t work for me; I got

      mount error: permission denied or not superuser and mount.cifs not installed SUID

      I too had this problem
      You have to set the right owner for the mount point

      for example, about the command:

      //server/share /mnt cifs rw,user,noauto,username=user,password=pass 0 0

      /mnt has to be owned by user:user_group

      ps. remember to add suid to umount.cifs too

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.5 on Ubuntu Linux Ubuntu Linux
    8. Gravatar Luke UNITED STATES Says:

      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…

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.2 on Ubuntu Linux Ubuntu Linux
    9. Gravatar jonboy UNITED KINGDOM Says:

      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.

      Posted using Mozilla Firefox Mozilla Firefox 1.5.0.4 on Windows Windows XP

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <pre lang=""> <em> <i> <strike> <strong>

    [Quote selected]