[Samba] Samba with Mysql, compilation problem.

(C)ollen collen at zeist.hermanjordan.nl
Fri Sep 23 14:56:35 GMT 2005


pdb_sql.c is the new mysql backend name
(was pdb_mysql) so it does get compiled...
but this output shows that you still use 3.0.20.
and that's not the best version for mysql backends...!

i must note that i have made a small mistake regarding the
--enable-static=pdb_mysql.

it's --with-static-modules=pdb_mysql .!!

Greets.

Collen Blijenberg


Pierre MARTIN wrote:
> Rectification, the address you gave me have the 3.0.11 :)
> Thank you alot!
> Pierre
> 
> On 9/23/05, *Pierre MARTIN* <hickscorp at gmail.com 
> <mailto:hickscorp at gmail.com>> wrote:
> 
>     Hello Collen!
> 
>     I am actually making serious searchs in the configure script. Here
>     is WHATEVER i give as mysql input args, the compilation output:
> 
>     Compiling passdb/secrets.c
>     Compiling passdb/machine_sid.c
>     Compiling locking/locking.c
>     Compiling locking/brlock.c
>     Compiling locking/posix.c
>     Compiling passdb/pdb_get_set.c
>     Compiling passdb/passdb.c
>     Compiling passdb/pdb_interface.c
>     Compiling passdb/util_sam_sid.c
>     Compiling passdb/pdb_compat.c
>     Compiling passdb/lookup_sid.c
>     Compiling passdb/login_cache.c
>     Compiling passdb/pdb_ldap.c
>     Compiling passdb/pdb_nds.c
>     Compiling passdb/pdb_smbpasswd.c
>     Compiling passdb/pdb_tdb.c
>     Compiling passdb/pdb_guest.c
>     Compiling passdb/pdb_sql.c
>     Compiling lib/system_smbd.c
> 
>     As you can see here, nevermind if i ask for static, shared or
>     magic-cookied mysql plugin, it NEVER gets to compile it!
>     So there should be a misstake in some Makefile or rule file, the
>     problem is at compilation-time!
> 
>     I will try to get the 3.0.11 from somewhere (I did not find it at
>     the link you gave me that is why i took 3.0.09).
> 
>     Please, if you know somebody who can make the change in the makefile
>     scripts, tell me, or if i can get a way to compile pdb_mysql.c
>     alone, i'm interested too. I think now it is pointless to play
>     arround with configure script parametters, because it doesn't
>     propagate correctly directives to the compilation makefiles.
> 
>     N.B.: The path to be given to the configure script seems to be the
>     path to mysql_config BINARY, in the configure script is made a call
>     to it with parametters to get the include path... So don't tell
>     anymore people to symlink if they have compiled from source, just
>     tell the configure script to ask the binary program "mysql_config"
>     (in configure script get the lines with $MYSQL_CONFIG
>     $mysqlconf_args --cflags | sed -e "s/'//g") ...
> 
>     Anyway, thanks a lot for your help, i am a bit closer to find a
>     solution now!
>     I'll try tonight to get the v.11 and your advices in action :)
> 
>     And, when you say if samba complains about not finding the plugin,
>     it does since the begining :O What chmod right 755 are you talking
>     about, i mean on what file?
> 
>     Thanks!
>     Pierre
> 
>     On 9/23/05, *(C)ollen* < collen at zeist.hermanjordan.nl
>     <mailto:collen at zeist.hermanjordan.nl>> wrote:
> 
>         ftp://ftp.samba.org/pub/samba/old-versions/
>         ------------------------------------------------------
> 
>         --enable-static=pdb_mysql -> compiles the mysql backend within
>         samba, so
>         no pdb_mysql.so module will be found!
> 
>         --with-shared-modules=pdb_mysql -> compiles mysql backend
>         sepperate, you
>         will find a pdb_mysql.so module..
> 
>         external is a little slower..
>         after this, you have to make sure to have set the parameters within
>         smb.conf!
> 
>         also, make the mysql database with the samba layout (example is
>         included
>         with in the source!)
>         be sure samba can access the db.
> 
>         if samba say's can't find plugin or somthing, just ignore it
>         (but besure
>         the chmod rights are ok 0755)
> 
>         Goodluck.
> 
>         Collen
> 
> 
>         MARTIN Pierre wrote:
>>  Hello again Collen and everybody.
>>
>>  I just tryed to make 3.0.09 compile pdb_mysql with no success.
>>  Can somebody please can tell me where to find the 3.0.11
>         version so i
>>  can make it as Collen has it (Because i was not able to make
>         it with
>>  3.0.14 default debian version, neither 3.0.09 neither 3.0.20
>         .. . doh!) ?
>>
>>  Thanks a lot.
>>  Pierre
>>
>>  (C)ollen wrote:
>>
>> > it is know that the mysql passwd backend is buggy/not working
>         with
>> > samba 3.0.20. (maybe it's fixed in the new release ??)
>> > the fact that you have a mysql.so, tells me that you build
>         the module
>> > as shared library.
>> > here are some thoughts:
>> >
>> > 1) try renaming the module to pdb_mysql.so
>> > 2) build it as static (./configure --with-expsam=mysql
>> > --enable-static=mysql)
>> > 3) use a samba version prior to 3.0.20 ( <- 3.0.14 )
>> >
>> > i couldn't make the mysql module work either, so we're still
>         running
>> > the 11 version...
>> >
>> > Greetz..
>> >
>> > Collen Blijenberg (C=)
>> >
>> > MARTIN Pierre wrote:
>> >
>> >> Hello everybody,
>> >> For those who have followed the mysql plugin compilation
>         problem,
>> >> here are some new information:
>> >> I have tryed everything to make it work from the debian
>         sources, not
>> >> successfully.
>> >> So i have downloaded the TGZ sources from samba.org
>         <http://samba.org> (version is
>> >> 3.0.20). I have started the basic ./configure
>> >> script with params --with-expsam=xml,mysql
>> >> --with-mysql-prefix=/usr/include/mysql/
>> >> It worked so i started to make the compilation. It also have
>         compiled
>> >> successfully. But as usual with the debian source version,
>         it did not
>> >> compile any pdb_mysql.so. The only thing i get is a mysql.so
>         lib, but
>> >> it cant be loaded as a plugin...
>> >>
>> >> Any idea is really welcome, since i begin to lose the faith :)
>> >> Bye bye and thank you all!
>> >> Pierre
>> >>
>> >> P.S.: Here is the end of the compilation process:
>> >> Compiling modules/vfs_recycle.c with -fPIC
>> >> Building plugin bin/recycle.so
>> >> Compiling modules/vfs_audit.c with -fPIC
>> >> Building plugin bin/audit.so
>> >> Compiling modules/vfs_extd_audit.c with -fPIC
>> >> Building plugin bin/extd_audit.so
>> >> Compiling modules/vfs_full_audit.c with -fPIC
>> >> Building plugin bin/full_audit.so
>> >> Compiling modules/vfs_netatalk.c with -fPIC
>> >> Building plugin bin/netatalk.so
>> >> Compiling modules/vfs_fake_perms.c with -fPIC
>> >> Building plugin bin/fake_perms.so
>> >> Compiling modules/vfs_default_quota.c with -fPIC
>> >> Building plugin bin/default_quota.so
>> >> Compiling modules/vfs_readonly.c with -fPIC
>> >> Compiling modules/getdate.c with -fPIC
>> >> Building plugin bin/readonly.so
>> >> Compiling modules/vfs_cap.c with -fPIC
>> >> Building plugin bin/cap.so
>> >> Compiling modules/vfs_expand_msdfs.c with -fPIC
>> >> Building plugin bin/expand_msdfs.so
>> >> Compiling modules/vfs_shadow_copy.c with -fPIC
>> >> Building plugin bin/shadow_copy.so
>> >> Compiling passdb/pdb_xml.c with -fPIC
>> >> Building plugin bin/xml.so
>> >> Compiling passdb/pdb_mysql.c with -fPIC
>> >> Building plugin bin/mysql.so
>> >> Compiling modules/CP850.c with -fPIC
>> >> Building plugin bin/CP850.so
>> >> Compiling modules/CP437.c with -fPIC
>> >> Building plugin bin/CP437.so
>> >>
>> >>
>> >> (C)ollen wrote:
>> >>
>> >>> hmm.. try
>> >>>
>> >>> ./configure --with-expsam=mysql --with-shared-modules=pdb_mysql
>> >>>
>> >>> mysql lib's in the: /usr/lib/mysql (symlink will do)
>> >>> mysql headers in the: /usr/include/mysql (symlink will do)
>> >>>
>> >>> you can compile the mysql_backend into samba so there isn't an
>> >>> external module !
>> >>>
>> >>> your problem is that samba can't find the header files from
>         mysql (.h)
>> >>> I think that the guy's from debian left the mysql backend out,
>> >>> coz' it's somewhat experimental, and lackes support..
>> >>> never the less, it works, and we have it up and running for
>         almost
>> >>> 2years now!!
>> >>>
>> >>> have fun
>> >>>
>> >>> Collen Blijenberg (MLHJ)
>> >>>
>> >>> MARTIN Pierre wrote:
>> >>>
>> >>>> First i would like to say hello to everybody here, because
>         i am new
>> >>>> to this ML.
>> >>>>
>> >>>> So here is the description of my problem:
>> >>>> I began with a clean samba installation from the stable
>         branch few
>> >>>> monthes ago, everything was just fine, i have a linux box
>         which was
>> >>>> sharing files for another linux workstation and two WinXP
>         laptops.
>> >>>> The sharing linux box is a debian stable branch O/S, which
>         is my
>> >>>> choice for a long time now.
>> >>>>
>> >>>> Few weeks ago, i decided to make my sparkling samba
>         installation
>> >>>> virtual-users aware, and i began to crawl on various
>         websites, all
>> >>>> explaining the smb.conf parametters to give. I figured out
>         that i
>> >>>> was just not able to make it run because of a main
>         problem, the
>> >>>> apt-get samba gave me a non mysql-powered-samba version :(
>> >>>>
>> >>>> So i removed the samba package from the computer, and
>         dowloaded the
>> >>>> debian source of it. Basic source, untared, and had a look
>         to the
>> >>>> debian/rule file. I saw there was any parametters given
>         about mysql
>> >>>> building, so i also had a look at the configure script's
>         options.
>> >>>> It always compiles the brand new warm .deb packages (after
>         i fixed
>> >>>> some lacky dependencies, i had to make a fake mysql-common
>         package
>> >>>> by myselve, because i already had mysql installed from
>         sources and
>> >>>> did not want to install the deb package, etc...). I'm now
>         totally
>> >>>> lost, i have try everything and i can't get this pdb_mysql.so
>> >>>> "plugin" ready :(
>> >>>>
>> >>>> So maybe i have miss something, maybe there is another way
>         to make
>> >>>> it as i wish to be, maybe there is a simple way to
>         indirectly link
>> >>>> samba to mysql with pam (I don't know PAM rules at all, i
>         neither
>> >>>> don't know how it works).
>> >>>>
>> >>>> It has been 4 days i'm looking for a solution, mailing random
>> >>>> people i find on websites, no answers from them.
>> >>>>
>> >>>> Please if somebody has any clue, let me know a link, a
>         sound, a
>> >>>> color, anything to find a way to make it work...
>> >>>> Anything to make it work from the stable .deb packages
>         appreciated
>> >>>> too.
>> >>>>
>> >>>> Thank you a lot!
>> >>>>
>> >>>> Pierre.
>> >>>>
>> >>>> P.S.: Here is the current configure parametters i use
>         extracted
>> >>>> from my rule file:
>> >>>>                --cache-file=./config.cache --with-fhs
>> >>>> --enable-shared --enable-static --prefix=/usr
>         --sysconfdir=/etc
>> >>>> --libdir=/etc/samba --with-privatedir=/etc/samba
>> >>>> --with-piddir=/var/run/samba --localstatedir=/var
>         --with-netatalk
>> >>>> --with-pam --with-syslog --with-utmp --with-readline
>> >>>> --with-pam_smbpass --with-libsmbclient --with-winbind
>         --with-msdfs
>> >>>> --with-automount --with-tdbsam --with-ldap --with-python=
>         python2.3
>> >>>> --with-mysql --enable-mysql
>         --with-mysql-prefix=/usr/local/mysql
>> >>>> --with-expsam=mysql
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>
>> >
>> >
>>
> 
> 
> 
> 



More information about the samba mailing list