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

Ben Gaide bgaide at Mines.EDU
Tue Apr 5 23:20:19 GMT 2005


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 (127.0.0.1)
> 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'
>>>>
>>

-------------- next part --------------
  Substituting charset 'ANSI_X3.4-1968' for LOCALE
[2005/04/05 17:04:52, 3] printing/pcap.c:pcap_cache_reload(114)
  reloading printcap cache
[2005/04/05 17:04:52, 5] printing/print_cups.c:cups_cache_reload(71)
  reloading cups printcap cache
[2005/04/05 17:04:52, 3] printing/pcap.c:pcap_cache_reload(213)
  reload status: ok
[2005/04/05 17:04:52, 3] param/loadparm.c:lp_add_printer(2439)
  adding printer service PDF
[2005/04/05 17:04:52, 3] param/loadparm.c:lp_add_printer(2439)
  adding printer service FIJI-LJ1200
[2005/04/05 17:04:52, 2] lib/interface.c:add_interface(81)
  added interface ip=138.67.86.203 bcast=138.67.86.255 nmask=255.255.255.0
[2005/04/05 17:04:52, 5] lib/util.c:init_names(256)
  Netbios name list:-
  my_netbios_names[0]="FIJIFILES"
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 3] smbd/uid.c:push_conn_ctx(365)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_nt_user_token(485)
  NT user token: (NULL)
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_unix_user_token(506)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:make_pdb_context_list(823)
  Trying to load: mysql:foo
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend ldapsam
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'ldapsam'
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend ldapsam_compat
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'ldapsam_compat'
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend NDS_ldapsam
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'NDS_ldapsam'
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend NDS_ldapsam_compat
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'NDS_ldapsam_compat'
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend smbpasswd
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'smbpasswd'
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend tdbsam
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'tdbsam'
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend guest
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'guest'
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:make_pdb_methods_name(705)
  Attempting to find an passdb backend to match mysql:foo (mysql)
[2005/04/05 17:04:52, 2] passdb/pdb_interface.c:make_pdb_methods_name(711)
  No builtin backend found, trying to load plugin
[2005/04/05 17:04:52, 5] lib/module.c:smb_probe_module(104)
  Probing module 'mysql'
[2005/04/05 17:04:52, 5] lib/module.c:smb_probe_module(115)
  Probing module 'mysql': Trying to load from /usr/lib/samba/pdb/mysql.so
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(94)
  Attempting to register passdb backend mysql
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:smb_register_passdb(107)
  Successfully added passdb backend 'mysql'
[2005/04/05 17:04:52, 2] lib/module.c:do_smb_load_module(66)
  Module '/usr/lib/samba/pdb/mysql.so' loaded
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:make_pdb_methods_name(726)
  Found pdb backend mysql
[2005/04/05 17:04:52, 1] passdb/pdb_mysql.c:mysqlsam_init(461)
  Connecting to database server, host: localhost, user: samba, database: samba, port: 3306
[2005/04/05 17:04:52, 5] passdb/pdb_mysql.c:mysqlsam_init(488)
  Connected to mysql db
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:make_pdb_methods_name(729)
  pdb backend mysql:foo has a valid init
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:make_pdb_methods_name(705)
  Attempting to find an passdb backend to match guest (guest)
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:make_pdb_methods_name(726)
  Found pdb backend guest
[2005/04/05 17:04:52, 5] passdb/pdb_interface.c:make_pdb_methods_name(729)
  pdb backend guest has a valid init
[2005/04/05 17:04:52, 5] passdb/pdb_mysql.c:mysqlsam_select_by_field(237)
  Executing query SELECT logon_time,logoff_time,kickoff_time,pass_last_set_time,pass_can_change_time,pass_must_change_time,username,'fijinet',nt_username,nt_fullname,home_dir,dir_drive,logon_script,profile_path,acct_desc,workstations,unknown_str,munged_dial,user_sid,group_sid,lm_pw,nt_pw,NULL,acct_ctrl,logon_divs,hours_len,bad_password_count,logon_count,unknown_6 FROM user WHERE user_sid = 'S-1-5-21-837383790-721031919-3348239020-501'
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 3] smbd/uid.c:push_conn_ctx(365)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_nt_user_token(485)
  NT user token: (NULL)
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_unix_user_token(506)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 2
[2005/04/05 17:04:52, 3] smbd/uid.c:push_conn_ctx(365)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 2
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_nt_user_token(485)
  NT user token: (NULL)
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_unix_user_token(506)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 2
[2005/04/05 17:04:52, 3] smbd/uid.c:push_conn_ctx(365)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 2
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_nt_user_token(485)
  NT user token: (NULL)
[2005/04/05 17:04:52, 5] auth/auth_util.c:debug_unix_user_token(506)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 1
[2005/04/05 17:04:52, 3] smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2005/04/05 17:04:52, 5] auth/auth_util.c:make_server_info_sam(862)
  make_server_info_sam: made server info for user nobody -> nobody
[2005/04/05 17:04:52, 3] smbd/server.c:main(831)
  loaded services
[2005/04/05 17:04:52, 3] smbd/server.c:main(846)
  Becoming a daemon.
[2005/04/05 17:04:52, 2] lib/tallocmsg.c:register_msg_pool_usage(57)
  Registered MSG_REQ_POOL_USAGE
[2005/04/05 17:04:52, 2] lib/dmallocmsg.c:register_dmalloc_msgs(71)
  Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2005/04/05 17:04:52, 5] lib/gencache.c:gencache_init(59)
  Opening cache file at /var/cache/samba/gencache.tdb
[2005/04/05 17:04:52, 5] libsmb/namecache.c:namecache_enable(58)
  namecache_enable: enabling netbios namecache, timeout 660 seconds
[2005/04/05 17:04:52, 5] smbd/connection.c:claim_connection(170)
  claiming  0
[2005/04/05 17:04:52, 3] printing/printing.c:start_background_queue(1322)
  start_background_queue: Starting background LPQ thread
[2005/04/05 17:04:52, 5] printing/printing.c:start_background_queue(1332)
  start_background_queue: background LPQ thread started
[2005/04/05 17:04:52, 5] smbd/connection.c:claim_connection(170)
  claiming smbd lpq backend 0
[2005/04/05 17:04:52, 5] printing/printing.c:start_background_queue(1343)
  start_background_queue: background LPQ thread waiting for messages
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_KEEPALIVE = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_REUSEADDR = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_BROADCAST = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option TCP_NODELAY = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_LOWDELAY = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_THROUGHPUT = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDBUF = 16384
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVBUF = 87380
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDTIMEO = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVTIMEO = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_KEEPALIVE = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_REUSEADDR = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_BROADCAST = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option TCP_NODELAY = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_LOWDELAY = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_THROUGHPUT = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDBUF = 16384
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVBUF = 16384
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDTIMEO = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVTIMEO = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_KEEPALIVE = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_REUSEADDR = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_BROADCAST = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option TCP_NODELAY = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_LOWDELAY = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_THROUGHPUT = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDBUF = 16384
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVBUF = 87380
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDTIMEO = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVTIMEO = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_KEEPALIVE = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_REUSEADDR = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_BROADCAST = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option TCP_NODELAY = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_LOWDELAY = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option IPTOS_THROUGHPUT = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDBUF = 16384
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVBUF = 16384
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVLOWAT = 1
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_SNDTIMEO = 0
[2005/04/05 17:04:52, 5] lib/util_sock.c:print_socket_options(147)
  socket option SO_RCVTIMEO = 0
[2005/04/05 17:04:52, 2] smbd/server.c:open_sockets_smbd(329)
  waiting for a connection
[2005/04/05 17:06:56, 3] smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2005/04/05 17:06:56, 5] auth/auth_util.c:debug_nt_user_token(485)
  NT user token: (NULL)
[2005/04/05 17:06:56, 5] auth/auth_util.c:debug_unix_user_token(506)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2005/04/05 17:06:56, 5] smbd/uid.c:change_to_root_user(296)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2005/04/05 17:06:56, 2] smbd/server.c:exit_server(609)
  Closing connections
[2005/04/05 17:06:56, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to 
[2005/04/05 17:06:56, 5] smbd/oplock.c:receive_local_message(107)
  receive_local_message: doing select with timeout of 1 ms
[2005/04/05 17:06:56, 3] smbd/server.c:exit_server(652)
  Server exit (Caught TERM signal)
[2005/04/05 17:06:56, 3] smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2005/04/05 17:06:56, 5] auth/auth_util.c:debug_nt_user_token(485)
  NT user token: (NULL)
[2005/04/05 17:06:56, 5] auth/auth_util.c:debug_unix_user_token(506)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2005/04/05 17:06:56, 5] smbd/uid.c:change_to_root_user(296)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2005/04/05 17:06:56, 2] smbd/server.c:exit_server(609)
  Closing connections
[2005/04/05 17:06:56, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to 
[2005/04/05 17:06:56, 3] smbd/connection.c:yield_connection(76)
  yield_connection: tdb_delete for name  failed with error Record does not exist.
[2005/04/05 17:06:56, 5] smbd/oplock.c:receive_local_message(107)
  receive_local_message: doing select with timeout of 1 ms
[2005/04/05 17:06:56, 3] smbd/server.c:exit_server(652)
  Server exit (Caught TERM signal)


More information about the samba mailing list