I have a problem with loading the MySQL Plugin. smbclient fails with error: Protocol negotiation failed var/log.smbd: [2003/06/09 14:36:29, 0] smbd/server.c:main(747) smbd version 3.0.0beta1 started. Copyright Andrew Tridgell and the Samba Team 1992-2003 [2003/06/09 14:36:29, 2] param/loadparm.c:do_section(3376) Processing section "[homes]" [2003/06/09 14:36:29, 2] lib/interface.c:add_interface(79) added interface ip=192.168.83.1 bcast=192.168.83.255 nmask=255.255.255.0 [2003/06/09 14:36:29, 2] lib/interface.c:add_interface(79) added interface ip=172.16.143.1 bcast=172.16.143.255 nmask=255.255.255.0 [2003/06/09 14:36:29, 2] lib/interface.c:add_interface(79) added interface ip=172.16.87.1 bcast=172.16.87.255 nmask=255.255.255.0 [2003/06/09 14:36:29, 2] lib/tallocmsg.c:register_msg_pool_usage(57) Registered MSG_REQ_POOL_USAGE [2003/06/09 14:36:29, 2] lib/dmallocmsg.c:register_dmalloc_msgs(71) Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED [2003/06/09 14:36:29, 2] smbd/server.c:open_sockets_smbd(318) waiting for a connection [2003/06/09 14:36:42, 2] passdb/pdb_interface.c:make_pdb_methods_name(438) No builtin backend found, trying to load plugin [2003/06/09 14:36:42, 2] lib/module.c:smb_load_module(56) Module '/usr/local/samba/lib/pdb/mysql.so' loaded [2003/06/09 14:36:42, 0] passdb/pdb_interface.c:make_pdb_methods_name(448) No builtin nor plugin backend for mysql found [2003/06/09 14:36:42, 1] passdb/pdb_interface.c:make_pdb_context_list(529) Loading mysql:user failed! [2003/06/09 14:36:42, 2] passdb/pdb_interface.c:make_pdb_methods_name(438) No builtin backend found, trying to load plugin [2003/06/09 14:36:42, 2] lib/module.c:smb_load_module(56) Module '/usr/local/samba/lib/pdb/mysql.so' loaded [2003/06/09 14:36:42, 0] passdb/pdb_interface.c:make_pdb_methods_name(448) No builtin nor plugin backend for mysql found [2003/06/09 14:36:42, 1] passdb/pdb_interface.c:make_pdb_context_list(529) Loading mysql:user failed! smb.conf: [global] workgroup = GSB server string = Samba Server log level = 2 security = user encrypt passwords = yes socket options = TCP_NODELAY dns proxy = no domain logons = yes os level = 65 preferred master = true domain master = true wins proxy = yes wins support = yes passdb backend = mysql:user, guest [homes] comment = Home Directories browseable = no writable = yes The Problem did not exist for me in the alpha24 iirc
Could you retry with log level = 5 and post the logs here?
Created attachment 21 [details] log.smbd with loglevel 5 will also add the output of smbclient
Created attachment 22 [details] output of smbclient looked more interesting the first time. will have a look to reproduce that output
Created attachment 23 [details] output of smbclient with some more errors id did not change anything. this time i called smbclient as a user, but also got the errors as root
It looks like there's nothing happening in the init_module() of your plugin. Can you verify /usr/local/samba/lib/pdb/mysql.so exists and comes from 3.0.0beta1 ?
the module exists - im sure. i think the logs would not print "Module '/usr/local/samba/lib/pdb/mysql.so' loaded" then. How should I verify this? I build samba several times. everytime with a freshbuilt module. First I had the problem in beta1 (alpha24 worked fine in this point). Then the problem was in beta1 and also in SAMBA 3 cvs which i am using now. i am sure to have build the module with the correct version and have copied it in the right place. before this i deleted the hole samba directory. i can rebuilt the beta or the cvs and go 100% sure to have done everything right if this helps you, but im quite sure already. (sorry for my language... not native and getting a little bit tired)
The weird thing about this bug is that I don't think anything important changed between alpha24 and beta1! Also, while init_module() appears to be available in the module you have installed, the only line in it (with smb_register_passdb) doesn't seem to be executed. I'll look more into this tomorrow.
Hello, I had the same problems and tried to figure it out: the problem is in modules.c: smb_load_modules searches with sys_dlsym(handle,"init_module"); for a function called "init_module()" in mysql.so, but pdb_mysql.c doesn't have such a function, only "pdb_mysql_init()". But this would only be called if it would be statically built in. A simple solution is to copy the pdb_mysql_init() function to init_module() an recompile pdb_mysql.c (by the way, I needed to add -lmysqlclient to the Makefile to get mysql.so running). Don't know how the right behaviour should be (init_module() oder pdb_mysql_init () or through plugin.so (which also doesn't have a init_module() function). :)
Thimo Eichstädt's solution works for me also. I also had to add the -libmysqlclient and recompile whole samba to get it work.
If everything works correctly, pdb_mysql_init() gets defined to be init_module() and -lmysqlclient is added to the linker flags by configure. IIRC something changed there in beta1 so I'll look it up...
How did you configure samba? --with-expsam? --with-shared-modules=pdb-mysql ?
neither nor, just ./configure without any options
Ah, ok. Jerry added the '--with-expsam' option in 3.0beta1. You need to specify that in order to be able to build the mysql plugin. It is build in 'make all' then as well.
seems to work configured with '--with-expsam=mysql'
originally reported against 3.0.0beta1. CLeaning out non-production release versions.
database cleanup