Mounting Windows 2003 Shares (kernels 2.4 or 2.6)

Posted on 2004-08-28
Last Modified: 2010-03-17
Our company is migrating the NT servers to Windows 2003.  We have several Linux boxes that do various things.  But they do need to access read/write the migrated shares.  These shares are Active-Directory shares.....

I have scoured the net for solutions to little avail.  I would appreciate a step by step solution if possible.

The kernels I am using are 2.4.20-28.8 (RH 8 with Samba 3.0.5) and 2.6.5-1.358 (FC 2 Samba 3.0.3-5).  I have seen several ideas about cifsvfs.  But all seem rather daunting on the 2.4 kernel.  Is this overkill?  I am rather frustrated but this needs to be resolved soon.  Man everything was cool with NT, stupid 2003..... yeeesh..... anyway enough whining.  I need solutions and I KNOW the Linux community has been successful with this.  I have fiddled a bit with "smb.conf" and done things like "client signing = mandatory" and so forth but that doesn't work either.  Here is an example of attempts

On the RH-8
# mount -t smbfs //Target2003/test /mnt/test -o username=foo
cli_negprot: SMB signing is mandatory and we have disabled it.
24610: protocol negotiation failed

On the FC2
# mount -t smbfs //Target2003/test /mnt/test -o username=foo
cli_negprot: SMB signing is mandatory and we have disabled it.
24642: protocol negotiation failed

# mount -t cifs //Target2003/test /mnt/test -o user=foo
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page ( mount.cifs)

You would think the FC-2 cifs is a permissions problem but I can access this share via XP (yes I tainted mine hands with it....) no problem (naturally).......

Any and all help greatly appreciated.
Question by:ninksink
  • 4
  • 2
LVL 17

Accepted Solution

owensleftfoot earned 500 total points
ID: 11927614
"cli_negprot: SMB signing is mandatory and we have disabled it."

Your problem isnt a linux one. "we have disabled it" is the clue. If the windows box can disable it, it stands to reason that it can enable it.

Expert Comment

ID: 11927956
Read Samba docs,
the way to mount windows 2003 shares is to use CIFS (read Samba Docs)

Author Comment

ID: 11944535
Damnit.  I just fat fingered the accept for the "it's windows fault" solution.  It is not.  The 2003 has samba signing set as default.  At least that is what our Windows tech says.

I am currently trying to get a module for cifs compiled.  Me thinks my 2.4.20-28.8 kernel source is wacked.  I keep trying to compile and it fails.  Now I downloaded 2.4.20 vanilla source and compiled cifs no problemo, BUT I am running 28.8 and naturally "insmod" says something akin to "this module compiled under 2.4.20 and current kernel is 2.4.20-28.8....  arrrghh.

Anyone else have similar issues or am I in this boat alone?  :-(
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.


Author Comment

ID: 11945830
OK.  I just succeeded.  This is how I did it on Kernel 2.4.20-28.8 (or 2.4 in general) on HedRat 8.0

In my case here is the SW
Samba: 3.0.5 (I highly suggest this as 3.0.3-5 on 2.6 does not mount 2003 with much success)
Kernel: 2.4.20-28.8 (HedRat 8.0)
CIFS: latest from as a MODULE not as part of the kernel (too much work there)
Arch: i386

(NOTE: remember to substitute your arch and kernel versions)

* download Samba 3.0.5 source rpm (not the binary)
* rpm -ivh samba-3.0.5-2.src.rpm
* cd /usr/src/redhat
* rpmbuild -bb SPECS/samba3.spec
* rpm -Uvh RPMS/i386/samba-3.0.5-2.i386.rpm

* View the README in the cifs download tar.gz

* Download kernel-source-2.4.20-28.8.i386.rpm from where ever you can find it.
* rpm -ivh kernel-source-2.4.20-28.8.i386.rpm
* cd /usr/src/linux-2.4.20-28.8
* patch -p1 < whereEverYouExpandedCIFS/cifs_24.patch
* cp configs/kernel-2.4.20-i386.config arch/i386/defconfig
* make mrproper
* make oldconfig (you will likely be asked about CIFS, I flagged it to be a module.  If you don't see it there, use "make menuconfig and in FileSystems/NetworkFileSystems flag it as "M" there)
* cd fs/cifs
* cp whereEverYouExpandedCIFS/cifs/* .
* make dep
* make modules (this will take a rather long time)

I preferred NOT to use "make install_modules" just so I didn't hose my currently fine running kernel.  So
* cp fs/cifs/cifs.o /lib/modules/2.4.20-28.8/kernel/fs/cifs/cifs.o (you may have to create the cifs sub-dir in /lib/modules/2.4.20-28.8/kernel/fs)

* cd /usr/sbin
* gcc samba/source/client/mount.cifs.c -o mount.cifs (remember where you have your rpm source)
* cd /sbin
* ln -s /usr/sbin/mount.cifs mount.cifs

* Test "mount.cifs //WinDozeShre /mnt/Win2003 -o user=foo,pass=bar"

That should be it.  I hope I didn't miss a step or two.  If you have problems feel free to contact me.

Author Comment

ID: 11945860
Forgot to mention,

BEFORE "make modules"

* Edit Makefile and change the version for 2.4.20-28.8custom to 2.4.20-28.8 (otherwise insmod will whine that the
module was compiled as custom and NOT load it.)
LVL 17

Expert Comment

ID: 11946621
You can ask an admin to refund your points - you solved  it yourself.

Author Comment

ID: 11947254
>  You can ask an admin to refund your points - you solved  it yourself.


Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question