[Samba] Need help with redhat build to --prefix

Michael Wood esiotrot at gmail.com
Mon Oct 24 05:02:44 MDT 2011


Hi

On 21 October 2011 20:23, Joy Veronneau <jv11 at cornell.edu> wrote:
> Hi,
>
> Thanks, I think that setting LD_LIBRARY_PATH would fix the problem on the
> command line, but here's a little more information about what I want to
> do.
>
> I am installing winbindd on a radius server running Radiator. I will start
> /app/radius/samba/bin/winbindd whenever the server reboots. Then radiator
> will be using /app/radius/samba/sbin/ntlm_auth when people need to
> authenticate. So I have to set it up so every time ntlm_auth runs, it can
> find the libraries... I was hoping there would be a way to build it so
> that would work but I am pretty rusty on my C programming/building
> skills...

Well, you could do this in various ways.  e.g. rename ntlm_auth to
ntlm_auth.real and then create a script called ntlm_auth like this:

#!/bin/sh
export LD_LIBRARY_PATH=/app/radius/samba/lib
exec /app/radius/samba/sbin/ntlm_auth.real "$@"

> Or maybe there is a way to specify the library location in the samba
> config file?

I don't believe so.

It seems what you need is to pass the -rpath option to the linker
while building Samba.  This will explicitly tell the dynamic linker
where to find the libraries when running the binaries.

Try configuring Samba like this (untested):

LDFLAGS=-Wl,-rpath,/app/radius/samba/lib ./configure ...

-- 
Michael Wood <esiotrot at gmail.com>


More information about the samba mailing list