The documentation for the configuration of the MySQL backend is vague. I'm trying to integrate the Samba MySQL columns with the user columns used by libnss-mysql (http://libnss-mysql.sourceforge.net/), so that a single table can contain all relevant user info. According to the Samba MySQL documentation, columns can be de-activated by setting them to NULL. That does not seem to be the case. smb.conf: [global] netbios name = TEST workgroup = SMBTEST security = user domain logons = yes domain master = yes passdb backend = mysql:mysql mysql:mysql host = localhost mysql:mysql user = samba mysql:mysql password = samba mysql:mysql database = samba mysql:domain column = 'TEST' # rows we don't use mysql:logon_time column = NULL mysql:logoff_time column = NULL mysql:kickoff_time column = NULL mysql:workstations column = NULL mysql:logon_count column = NULL mysql:unknown string column = NULL mysql:munged dial column = NULL mysql:plain pass column = NULL mysql:acct ctrl column = NULL mysql:unknown 3 column = NULL mysql:logon divs column = NULL mysql:hours len column = NULL mysql:bad password count column = NULL mysql:unknown 6 column = NULL encrypt passwords = yes map to guest = bad user guest account = nobody smerrill@smerrill:~$ sudo /usr/local/samba/bin/smbpasswd -a cinergi Connecting to database server, host: localhost, user: samba, password: samba, database: samba, port: 3306 New SMB password: Retype new SMB password: Error executing INSERT INTO user (NULL,pass_can_change_time,pass_must_change_time,pass_last_set_time,NULL,NULL,user_sid,group_sid,username,nt_fullname,profile_path,home_dir,lm_pw,nt_pw) VALUES (16,1098385591,2147483647,1098385591,21,168,'S-1-5-21-1814649261-947299084-2114394419-11000','S-1-5-21-1814649261-947299084-2114394419-11001','cinergi','Ben Goodwin','\\\\test\\cinergi\\profile','\\\\test\\cinergi','E52CAC67419A9A224A3B108F3FA6CB6D','8846F7EAEE8FB117AD06BDD830B7586C'), You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL,pass_can_change_time,pass_must_change_time,pass_last_set_t Failed to add entry for user cinergi. Failed to modify password entry for user cinergi If I comment out all the NULL definitions in smb.conf, then `smbpasswd -a <user>` works as expected. If the answer is "You must use all the columns", than I'm okay with that. I'd just like to see the relevant documentation indicate that. Otherwise, I'd like to know that I can define only those columns that are of use to my environment.
Incidentally, I'd be happy to help improve the official documentation!
Try NULL: instead of just NULL.
Fixed in SVN. Thanks!
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.