Hello, I've recently tried to change samba (Version 3.0.20b) from smbpasswd auth to mysql(5) auth using a remote mysql server. To generate my database table I used the supplied file in the samba vanilla distribution under examples/pdb/mysql called 'mysql.dump'. Then I used pdbedit -i smbpasswd -e mysql:blah to migrate of course. That yielded some column entry problem so I tried to add a brand new user which yielded the exact same column entry mistake. Using mysql i altered the default table and it worked like a charm! The problem was 1) a syntax (mysql version?) mistake and 2) both columns logon_hours AND logon_count must exist. I generated a small patch to the current samba vanilla and also pasted it in. Cheers, r. p.s. I hope im sending it off to the right list... (Also availible on http://www.sevenrains.ro/pak/smb_mysql.patch) --- mysql.dump~ 2005-12-11 02:15:17.000000000 +0200 +++ mysql.dump 2005-12-11 02:15:17.000000000 +0200 @@ -20,7 +20,7 @@ workstations varchar(255), unknown_str varchar(255), munged_dial varchar(255), - uid int(9) NOT NULL DEFAULT "0" PRIMARY KEY auto_increment, + uid int(9) NOT NULL PRIMARY KEY auto_increment, gid int(9), user_sid varchar(255), group_sid varchar(255), @@ -33,5 +33,6 @@ unknown_5 int(9), unknown_6 int(9) default "1260", bad_password_count int(9), + logon_hours int(9) logon_count int(9) );