[Samba] RE: MYSQL - Was Functional till Update to 3.13

Ben Gaide bgaide at Mines.EDU
Wed Apr 6 20:47:30 GMT 2005

Did you make the posix users aswell ?? (with a script?)  -- POSIX not 
familiar with that, but Yes the users have valid linux accounts, I have 
reverted back to 3.10 and samba once again adds users.

I didnt try to comment out foo:domain column = 'DOMAIN' because I 
reverted before I received your last message. I know that samba was able 
to read and insert the sql (permission wise) because I did check useing 
the samba_sql_user with samba_sql_password. I also know this because the 
samba password file, which is the only backup login method, did not 
contain anyone but administrator; yet people who already had accounts 
were able to login and there profile loaded etc.

Also, users that I added BY HAND to the Sql database worked just fine.

Does Anyone know if the SMB.conf requires changes with 3.13 so that 
samba will insert the data for the following fields. Is is possible that 
samba is trying to change the type versus what used to be there? Ie # 
instead of V char etc.

  username    domain    nt_username    nt_fullname    home_dir    

Note that there were no other changes to the system nor any changes to 
the smb.conf besides compileing samba 3.10 to make the system work again.

Gentoo Linux
    x86 Core
    Kernel 2.6.10
    Samba Configured as PDC, Mysql passdb
    Mysql on same physical machine. Accepts local host connections 
useing samba sql_username/pass

Collen wrote:

> Hmm, You don't miss mutch.. straingely you miss a username aswell in 
> the  DB!
> Did you make the posix users aswell ?? (with a script?)
> try to comment 'foo:domain column = 'DOMAIN' ' out, and try again
> also try to connect to the databse with a mysql-client, to see if that 
> part works.!
> use the exact same settings you use with samba!
> (user, ip, pass)
> and try to update a record, ea. username ?
> if that part works (the mysqlclient), you know that the problem is 
> something else.
> my guesses is that it's a matter of eliminating possebilety's..
> Collen.
> Ben Gaide wrote:
>> Samba is Connecting and Inserting 1 Row, but It only sets 2 colums. 
>> NT Password and Lanman Password, The other colums Stay as Default.
>> For Insance. For the Attached log file I started Samba
>> As Root Did
>> smbpasswd -a username
>> password
>> password
>> Stop Samba
>> The mysql Database has the following new row
>> Row Headers
>> 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_drive    
>> logon_script    profile_path    acct_desc    workstations    
>> unknown_str    munged_dial    uid    gid    user_sid    group_sid    
>> lm_pw    nt_pw    acct_ctrl    unknown_3    logon_divs    
>> hours_len    unknown_5    unknown_6    bad_password_count    logon_count
>> Values
>> NULL      NULL      NULL      1112742397      1112742397      
>> 2147483647      NULL      FIJINET      NULL      NULL      NULL      
>> NULL      NULL      NULL      NULL      NULL      NULL      NULL      
>> 75      NULL      NULL      NULL      
>> AAA8B176C3D8E3DEAAD3AA35B51404EE     
>> AAA899154197E8AAA33121D76A240AB5      16      NULL      NULL      
>> NULL      NULL      NULL      NULL      NULL
>> Collen wrote:
>>> No errors in the log ???
>>> try setting the debug level a little higher.. (2 - 5)
>>> if samba can't connect to the db, it will show's up.
>>> you could also try to login with a mysql client, with the same
>>> settings of your samba config, to see if that part is right.
>>> dunno how you configed the mysql-server, sometimes people
>>> set it to only connect to the localhost (
>>> or disable localhost, and make it use the network IP.
>>> just be sure, that the settings you use within samba also work with 
>>> the mysql-client.
>>> but in both cases you should see debug info in the samba log's
>>> (like can't connect to the passwd-backend mysql, or something like 
>>> that)
>>> Laterz
>>> Collen.
>>> Ben Gaide wrote:
>>>> I didnt change anything else excludeing printer settings which when 
>>>> I reverted to the old config file still made no difference. I can 
>>>> add foo:mysql host = xxx.xxx.xxx.xxx, but I understand it deafults 
>>>> to local host and it is clear to see that it does actually connect 
>>>> and insert the correct lanman password. It even will change the 
>>>> password of people that were added before the update properly.
>>>> Log file lists No errors and I could not find any useful info. I 
>>>> will stop samba, Clear the log, start samba add user stop samba and 
>>>> attach that log later today.
>>>>> i miss the ' foo:mysql host = xxx.xxx.xxx.xxx '
>>>>> also what is your log-file telling you?
>>>>> does it find the backend? did something else change aswell ?
>>>>> Greet's
>>>>> Collen
>>>>> Ben Gaide wrote:
>>>>>> I updated samba from 3.10 to 3.13 to get the updated print fixes, 
>>>>>> but I noticed today that the smbpasswd script no longer 
>>>>>> functions. It fails to update the the following fields.
>>>>>> Please let me know if you have any ideas.
>>>>>> Sorry I didnt include the appropriate config file so I will atach 
>>>>>> the appropriate section now. Please not it is 3.0.13 not 3.13 as 
>>>>>> that would be impossible.
>>>>>>  # Samba Password Database configuration:
>>>>>>    passdb backend = mysql:foo
>>>>>>    foo:mysql user = samba
>>>>>>    foo:mysql password = PASSWORD
>>>>>>    foo:mysql database = samba
>>>>>>    foo:domain column = 'DOMAIN'

More information about the samba mailing list