Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Mounting Windows 2003 Shares (kernels 2.4 or 2.6)

Posted on 2004-08-28
Medium Priority
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 (e.g.man 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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 17

Accepted Solution

owensleftfoot earned 1000 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 http://www.samba.org/cifs/ 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

598 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