I had this problem before.
I was un-successful using pdb_mysql in < samba 3.0.20.
some bugs were found on pdb_mysql module in version prior to 3.0.20.
you should really use version 3.0.20 or above.
in samba 3.0.20b smb.conf,
you should not even mention column name. samba use only default column.
when i was setting up my samba pdc, whenever i defined column name in
smb.conf, pdbedit or smbpasswd will only inserted null value in mysql.
then i leave it to default column, and it works fine til now.
your smb.conf looks fine to me.
Edy
On Mon, 2005-12-12 at 05:47, Florian Stichlberger wrote:> Hi,
>
> i want to run a standalone-samba-PDC with a mysql-passdb backend and i
> configured the mysql-database as required.
> but how should i add/remove users ?
> when i try
> smbpasswd -a username
> most columns in database have [NULL] values
> i also tried pdbedit but it exits with "No user SID retrieved from
database!"
>
> is there another tool to add/remove users ?
> is my smb.conf ok, or do i need to mention each database column separately
?
> i have seen examples without separate mentioning...
> i appended a dump of my mysql-table and my smb.conf file
>
> thanks in advance
> Florian Stichlberger
> Hall in Tirol, Austria
>
> ##### MySQL-Dump of Database
>
> CREATE TABLE `user` (
> `logon_time` int(9) default NULL,
> `logoff_time` int(9) default NULL,
> `kickoff_time` int(9) default NULL,
> `pass_last_set_time` int(9) default NULL,
> `pass_can_change_time` int(9) default NULL,
> `pass_must_change_time` int(9) default NULL,
> `username` varchar(255) default NULL,
> `domain` varchar(255) default NULL,
> `nt_username` varchar(255) default NULL,
> `nt_fullname` varchar(255) default NULL,
> `home_dir` varchar(255) default NULL,
> `dir_drive` varchar(4) default NULL,
> `logon_script` varchar(255) default NULL,
> `profile_path` varchar(255) default NULL,
> `acct_desc` varchar(255) default NULL,
> `workstations` varchar(255) default NULL,
> `unknown_str` varchar(255) default NULL,
> `munged_dial` varchar(255) default NULL,
> `uid` int(9) NOT NULL auto_increment,
> `gid` int(9) default NULL,
> `user_sid` varchar(255) default NULL,
> `group_sid` varchar(255) default NULL,
> `lm_pw` varchar(255) default NULL,
> `nt_pw` varchar(255) default NULL,
> `acct_ctrl` int(9) default NULL,
> `unknown_3` int(9) default NULL,
> `logon_divs` int(9) default NULL,
> `hours_len` int(9) default NULL,
> `unknown_5` int(9) default NULL,
> `unknown_6` int(9) default '1260',
> `bad_password_count` int(9) default NULL,
> `logon_count` int(9) default '0',
> `logon_hours` int(9) default NULL,
> PRIMARY KEY (`uid`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
>
> ##### end of MySQL-dump
>
> ### dump of smb.conf
>
> [global]
> workgroup = WORKGROUP
> server string = SAMBA-Server
> netbios name = SAMBA
>
> passdb backend = mysql:foo
> foo:mysql host = localhost
> foo:mysql password = sambapass
> foo:mysql user = samba
> foo:mysql database = samba_auth
> foo:mysql port = 3306
> foo:table = user
> security = user
> encrypt passwords = no
> update encrypted = no
> unix password sync = yes
> passwd program = /usr/bin/passwd %u
> null passwords = no
>
> printing = none
> load printers = no
> domain logons = yes
> deadtime = 5
> preferred master = yes
> os level = 255
> domain master = yes
> local master = yes
> wins support = yes
> time server = yes
> hosts allow = 10.10.1.
> announce version = 4.9
> hide dot files = no
> map to guest = Bad User
> include = /etc/samba/dhcp.conf
> logon path = \\%L\profiles\.msprofile
> logon home = \\%L\%U\.9xprofile
> logon drive = P:
> case sensitive = no
> default case = lower
> short preserve case = yes
> preserve case = yes
> socket options = TCP_NODELAY
> oplocks = yes
>
> ##### end of smb.conf dump