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
  • Easy Way to Run IE under Wine
  • Lenovo Linux Vote
  • Kubuntu 7.10 (Gutsy) on Dell Inspiron 600m
  • Finally, a linux distro for me!

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

    1. Mookie Wilson UNITED STATES Mozilla Firefox Fedora Linux says:

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

      Reply  |  Quote
    2. snark SWEDEN Mozilla Firefox SuSE Linux says:

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

      Reply  |  Quote
    3. Luke UNITED STATES Mozilla Firefox Ubuntu Linux says:

      Yup, Mookie’s suggestion worked for me too.

      Reply  |  Quote
    4. korinthe UNITED STATES Mozilla Firefox RedHat Linux says:

      Unfortunately it didn’t work for me; I got

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

      Reply  |  Quote
    5. Luke UNITED STATES Mozilla Firefox SuSE Linux 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?

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

    7. Michele Bordi ITALY Mozilla Firefox Ubuntu Linux 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

      Reply  |  Quote
    8. Luke UNITED STATES Mozilla Firefox Ubuntu Linux 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…

      Reply  |  Quote
    9. jonboy UNITED KINGDOM Mozilla Firefox Windows 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.

      Reply  |  Quote

    Leave a Reply