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?  :-(
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.


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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Centos Rescue and NFS Share 4 65
Does fail2ban start automatically each time system starts? 1 180
Help with Ubuntu 14.04 LTS 10 132
Iptables and mirroring ports 4 78
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

861 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now