Mounting Windows 2003 Shares (kernels 2.4 or 2.6)

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.
Who is Participating?
owensleftfootConnect With a Mentor Commented:
"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.
Read Samba docs,
the way to mount windows 2003 shares is to use CIFS (read Samba Docs)
ninksinkAuthor Commented:
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?  :-(
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

ninksinkAuthor Commented:
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.
ninksinkAuthor Commented:
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.)
You can ask an admin to refund your points - you solved  it yourself.
ninksinkAuthor Commented:
>  You can ask an admin to refund your points - you solved  it yourself.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.