Bug 3191 - Incorrect (My)SQL syntax and lack of fields
Summary: Incorrect (My)SQL syntax and lack of fields
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: pdb_sql (show other bugs)
Version: 3.0.20b
Hardware: x86 Linux
: P3 regression
Target Milestone: none
Assignee: pdb_sql maintainers mail alias
QA Contact: Samba QA Contact
Depends on:
Reported: 2005-10-19 02:20 UTC by Paulo Pires
Modified: 2006-02-10 08:42 UTC (History)
0 users

See Also:

mysql.dump (1.37 KB, text/plain)
2005-10-19 02:22 UTC, Paulo Pires
no flags Details
this is a functional smb script for RH based distros (2.00 KB, text/plain)
2005-10-19 02:28 UTC, Paulo Pires
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Pires 2005-10-19 02:20:20 UTC
The following errors were found while installing Samba-3.0.20b from scratch in a
CentOS 4.1 system (RHEL based).

1 - After compiling successfuly all the samba stuff (--with-expsam=mysql), I go
to /path/to/samba-3.0.20b/examples/pdb/mysql/ and I try to run the specified
mysql.dump to my MySQL server. I've previously set up a user 'samba', owning the
samba database.

mysql -p -B samba < mysql.dump

This would return me an error about SQL syntax, and after looking at how MySQL
Administrator created this syntax, the way I know MySQL syntax, and the syntax
present in the file, I realized it was all different.

2 - After solving the 1st issue, when creating a user using "pdbedit -a", it
would return me an error about a non-existant field "logon_hours", which happens
not to be in the samba "mysql.dump", so all I had to do was creat it.

3 - smb.conf is not right. there's this ambiguous parameter "passdb backend =
plugin:/usr/local/samba/lib/pdb_mysql.so:mysql", which should be replaced for
"passdb backend = mysql:mysql"

My script and my smb.conf follow in attachment.
Comment 1 Paulo Pires 2005-10-19 02:22:49 UTC
Created attachment 1526 [details]

this is the script u ran into my database
Comment 2 Paulo Pires 2005-10-19 02:28:16 UTC
Created attachment 1527 [details]
this is a functional smb script for RH based distros

this is a functional smb script for RH based distros, and should be bundled in
the scripts folder for users like me that like to maintain their PDC from
source in RH based systems.
Comment 3 Florian Effenberger 2005-10-19 11:26:07 UTC
Look at https://bugzilla.samba.org/show_bug.cgi?id=3188, I have a mysql.dump
there that works for me.

@samba-pdbsql: We should get a fixed mysql.dump included into newer Samba releases.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2006-02-10 08:42:08 UTC
See bug 3375.  If someone wants to maintain these modules outside
the Samba source tree, that is fine.  But the source has been removed
from the upcoming 3.0.22 release.