[Samba] Trouble adding users with pdbedit

anders at dyekjaer.dk anders at dyekjaer.dk
Sun Apr 10 12:49:52 GMT 2005


Hi list, 

I hope you can help me out here... 

Freebsd 5.3
Samba 3.0.12 installed from ports 

I use MySQL as backed and when I try to add users with pdbedit I get the 
following error: 

"Username not found!" 

My command looks like this:
pdbedit -d 20 -a -u <username> -f "<Users name>" -c U 

Doing a little debugging I can tell that pdbedit tries to do a select 
statement after adding the user: 

Executing query SELECT 
logon_time,logoff_time,kickoff_time,pass_last_set_time,pass_can_change_time, 
pass_must_change_time,username,domain,nt_username,nt_fullname,home_dir,dir_d 
rive,logon_script,profile_path,acct_desc,workstations,unknown_str,munged_dia 
l,user_sid,group_sid,lm_pw,nt_pw,NULL,acct_ctrl,logon_divs,hours_len,bad_pas 
sword_count,logon_count,unknown_6 FROM user WHERE username = '<username>' 

The user is added to the database but the 'username' field is empty (NULL). 

The mysql bin log shows the following insert statement: 

INSERT INTO user 
(acct_ctrl,pass_can_change_time,pass_must_change_time,pass_last_set_time,nt_ 
fullname,lm_pw,nt_pw) VALUES (16,1113136610,2147483647,1113136610,'<users 
name>','E09E6C9F44E849D6AAD3B435B51404EE','A9644D0FA597F536F0EB6ACBE4620F80' 
);
SET TIMESTAMP=1113136617; 

So the insert statement is obviously missing some of fields... 

Am I doing something wrong and/or how can i fix this? 

Thanks in advance. 

~Anders 




More information about the samba mailing list