Bug 240676

Summary: After upgrading to samba.i386 3.0.24-5.fc6 smb crashes with errors
Product: [Fedora] Fedora Reporter: Neil Squires <neil>
Component: sambaAssignee: Samba Maint Team <samba-bugs-list>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: jplans
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-21 21:24:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
My smb conf file.
none
Open ldap conf file
none
LDAP Slapd conf file
none
smbd log file level 10
none
updated log file none

Description Neil Squires 2007-05-19 23:38:59 UTC
Description of problem: I upgraded my samba to the latest version from updates
(3.0.24-5 and then the smb process crashes out with the log showing the following:

May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/asyncdns.c:start_async_dns(151) 
May 20 09:17:27 sensi nmbd[3188]:   started asyncdns process 3189 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_logonnames.c:add_logon_names(163) 
May 20 09:17:27 sensi nmbd[3188]:   add_domain_logon_names: 
May 20 09:17:27 sensi nmbd[3188]:   Attempting to become logon server for
workgroup N-KSQUIRES on subnet 192.168.1.2 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_logonnames.c:add_logon_names(163) 
May 20 09:17:27 sensi nmbd[3188]:   add_domain_logon_names: 
May 20 09:17:27 sensi nmbd[3188]:   Attempting to become logon server for
workgroup N-KSQUIRES on subnet UNICAST_SUBNET 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(335) 
May 20 09:17:27 sensi nmbd[3188]:   become_domain_master_browser_wins: 
May 20 09:17:27 sensi nmbd[3188]:   Attempting to become domain master browser
on workgroup N-KSQUIRES, subnet UNICAST_SUBNET. 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(349) 
May 20 09:17:27 sensi nmbd[3188]:   become_domain_master_browser_wins: querying
WINS server from IP 192.168.1.2 for domain master browser name N-KSQUIRES<1b> on
workgroup N-KSQUIRES 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_logonnames.c:become_logon_server_success(124) 
May 20 09:17:27 sensi nmbd[3188]:   become_logon_server_success: Samba is now a
logon server for workgroup N-KSQUIRES on subnet UNICAST_SUBNET 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_become_dmb.c:become_domain_master_stage2(113) 
May 20 09:17:27 sensi nmbd[3188]:   ***** 
May 20 09:17:27 sensi nmbd[3188]:    
May 20 09:17:27 sensi nmbd[3188]:   Samba server SENSI is now a domain master
browser for workgroup N-KSQUIRES on subnet UNICAST_SUBNET 
May 20 09:17:27 sensi nmbd[3188]:    
May 20 09:17:27 sensi nmbd[3188]:   ***** 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(290) 
May 20 09:17:27 sensi nmbd[3188]:   become_domain_master_browser_bcast: 
May 20 09:17:27 sensi nmbd[3188]:   Attempting to become domain master browser
on workgroup N-KSQUIRES on subnet 192.168.1.2 
May 20 09:17:27 sensi nmbd[3188]: [2007/05/20 09:17:27, 0]
nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(303) 
May 20 09:17:27 sensi nmbd[3188]:   become_domain_master_browser_bcast: querying
subnet 192.168.1.2 for domain master browser on workgroup N-KSQUIRES 
May 20 09:17:27 sensi smbd[3185]: [2007/05/20 09:17:27, 0]
services/services_db.c:svcctl_init_keys(420) 
May 20 09:17:27 sensi smbd[3185]:   init_services_keys: key lookup failed!
(WERR_ACCESS_DENIED) 
May 20 09:17:27 sensi smbd[3185]: [2007/05/20 09:17:27, 0] smbd/server.c:main(960) 
May 20 09:17:27 sensi smbd[3185]:   ERROR: failed to setup guest info. 

The system is functioning as a PDC using the LDAP password storage backend. 

Version-Release number of selected component (if applicable): samba.i386
3.0.24-5.fc6


How reproducible: Every time the /etc/init.d/smb restart/start is used.


Steps to Reproduce:
1. Install samba and configure the system to be a PDC with an LDAP backend
2. Upgrade samba to 3.0.24-5
3. try restarting the smbd services
  
Actual results: smb crashes out and no samba shares are available. nmbd still
runs and users can log in.


Expected results: smb starts, users can log on and map network resources.


Additional info: A search for the bug on Google shows that it is a known problem
with 3.0.24 using the ldap passwd backend and that it was fixed in 3.0.25.

Prior to the upgrade, samba and the system was working fine.

Comment 1 Neil Squires 2007-05-19 23:38:59 UTC
Created attachment 155053 [details]
My smb conf file.

Comment 2 Neil Squires 2007-05-19 23:41:09 UTC
Created attachment 155054 [details]
Open ldap conf file

Attached for reference

Comment 3 Neil Squires 2007-05-19 23:41:51 UTC
Created attachment 155055 [details]
LDAP Slapd conf file

Comment 4 Neil Squires 2007-05-19 23:55:08 UTC
Post to Fedora Forums with reference to samba bug

http://forums.fedoraforum.org/showthread.php?p=793627#post793627

Comment 5 Simo Sorce 2007-05-21 00:20:12 UTC
I am sorry the log you pasted show no trace of crashes.
Can you raise your log level to 10 reproduce the crash (I need a stack trace in
the logs) and post it as attachment here?

Comment 6 Neil Squires 2007-05-21 07:53:51 UTC
Created attachment 155077 [details]
smbd log file level 10

Comment 7 Neil Squires 2007-05-21 07:58:46 UTC
I am not sure how to launch smb using the /etc/init.d/smb and change the log
level. The log level was changed in the smb.conf and does not provide a stack
trace that I can see.

If you can post any hints on what to do to get the stack trace then please email me.

Thanks

Comment 8 Pete Graner 2007-05-21 11:39:57 UTC
In reply to comment #7.


Make the SMBDOPTIONS="-D" look like SMBDOPTIONS="-D -d 10" in the
/etc/sysconfig/samba file. This will override any options in the smb.conf file. 

Comment 9 Simo Sorce 2007-05-21 13:13:09 UTC
(In reply to comment #7)
> I am not sure how to launch smb using the /etc/init.d/smb and change the log
> level. The log level was changed in the smb.conf and does not provide a stack
> trace that I can see.

That's because there is no crash.
Samba exits on an error condition.
It seem something in your configuration is wrong.

Can you check your "nobody" user and group are correctly set up in your system
/etc/passwd,/etc/group files and there is no user/group with the same uid/gid on
the ldap server ?


Comment 10 Neil Squires 2007-05-21 13:17:55 UTC
Created attachment 155092 [details]
updated log file

Comment 11 Neil Squires 2007-05-21 13:28:02 UTC
Yes you are correct Samba is exiting on an error condition that has appeared
following my upgrade of the samba to 3.0.24-5 as I have stated. The previous
version was running fine.

See logwatch file for upgrade details below.

 
 Packages Updated:
    php-mysql.i386 5.1.6-3.6.fc6
    freeradius.i386 1.1.3-2.fc6
    samba-swat.i386 3.0.24-5.fc6
    ypbind.i386 3:1.19-7.fc6
    tcllib.noarch 1.9-2.fc6
    gsm.i386 1.0.12-3.fc6
    php-mbstring.i386 5.1.6-3.6.fc6
    openldap-clients.i386 2.3.30-2.fc6
    php.i386 5.1.6-3.6.fc6
    openldap-servers-sql.i386 2.3.30-2.fc6
    firefox.i386 1.5.0.10-6.fc6
    wavpack.i386 4.41-1.fc6
    openldap.i386 2.3.30-2.fc6
    php-common.i386 5.1.6-3.6.fc6
    procps.i386 3.2.7-10.fc6
    samba-common.i386 3.0.24-5.fc6
    openldap-servers.i386 2.3.30-2.fc6
    samba.i386 3.0.24-5.fc6
    samba-client.i386 3.0.24-5.fc6
    squirrelmail.noarch 1.4.10a-1.fc6
    php-pdo.i386 5.1.6-3.6.fc6
    openldap-devel.i386 2.3.30-2.fc6
    php-ldap.i386 5.1.6-3.6.fc6
    firefox-devel.i386 1.5.0.10-6.fc6
    php-cli.i386 5.1.6-3.6.fc6
    logrotate.i386 3.7.4-13.fc6
    nfs-utils.i386 1:1.0.10-10.fc6
    foomatic.i386 3.0.2-39.5.fc6
 
 ---------------------- yum End -------------------------

I still have my nobody user and group set up on my system and no changes were
made to the existing config files that were working the day before.

After I ran the yum update -y command and noticed that the samba and ldap server
had been updated. I restarted the services and notice the error.

None of the attached config files had been updated the day I did the upgrade.

Comment 12 Simo Sorce 2007-05-21 13:31:17 UTC
Can you tell me exactly what version were you using before the update?
This way I can easily identify the relevant changes and inspect the code to see
if we broke something by mistake.

Ty.

Comment 13 Neil Squires 2007-05-21 13:41:28 UTC
Ok. On the 14 Apr 07 I upgrade samba to samba.i386 3.0.24-4.fc6 with no problems.

I don't think you guys broke it. If you read the posts, there appears to
possibly be a problem with Samba that will be fixed in 3.0.25 when using the
LDAP backend. You may wish to check that first.

Regards

Neil

Comment 14 Simo Sorce 2007-05-21 14:44:56 UTC
I am trying to get enough evidence to understand what is the issue.
A minor upgrade shouldn;t break it so I am interesting in finding out what's
going on.

Can you tell me if you have a mapping for user nobody in /etc/samba/smbusers ?
Can you tell me if you see avc messages in the audit.log (if you have selinux
enabled and enforcing).
Can you attach the output of net groupmap list run as root?

Ty

Comment 15 Guenther Deschner 2007-05-21 15:02:03 UTC
Right, from a quick view over the logs, samba has all kinds of problems to
access your LDAP server. It cannot even access the rootdse

-----8<------------------snip--------------8<--------------
[2007/05/21 22:59:02, 3] lib/smbldap.c:smbldap_check_root_dse(1636)
  smbldap_check_root_dse: Expected one rootDSE,
----->8------------------snap-------------->8--------------

Likewise samba cannot access your toplevel basedn object in the Directory

-----8<------------------snip--------------8<--------------
[2007/05/21 22:59:02, 10] lib/smbldap.c:smbldap_search_ext(1237)
  Failed search for base: dc=n-ksquires,dc=id,dc=au, error: No such object ()
----->8------------------snap-------------->8--------------

Can you please make sure 

* there have been no ACL changes on the LDAP server side ?
* to look for errors in your LDAP servers log files ?

Although nothing points into that direction right now, can you please reset your
LDAP access password (using "smbpasswd -w yourpassword").

For faster testing: As long as "pdbedit -L -d 0" does not return your list of
users, smbd won't run properly.

Comment 16 Neil Squires 2007-05-21 20:51:21 UTC
For Ty,

I do not have a nobody user or group in the LDAP directory or the smbpasswd file
and never have.

The audit log was the second place I looked and am getting no error messages.
Selinux is enforcing.

Here is the output from the net grouplist map

[root@sensi samba]# net groupmap list > /home/nfsquires/net_groupmap_list
[2007/05/22 06:15:59, 0] passdb/pdb_ldap.c:ldapsam_setsamgrent(3098)
  ldapsam_setsamgrent: LDAP search failed: No such object
[2007/05/22 06:15:59, 0] passdb/pdb_ldap.c:ldapsam_enum_group_mapping(3170)
  ldapsam_enum_group_mapping: Unable to open passdb


For Guther,
          You are correct, my samba cannot access my LDAP directory. As I have
stated before, I did not change any LDAP ACL's (to my knowledge).

I have reset the ldap user password as requested and still no change.

Now another weird thing I have just found is that I have no slapd messages in my
/var/log/message log file. Yet the status is showing OK.

Also I have found that the upgrade has overwritten my ldap database. I had not
checked this before as I did not expect it to be wiped in the update.

I will restore it from backups and advise.

Comment 17 Neil Squires 2007-05-21 21:00:38 UTC
Restored from backup and system is now working.

This problem needs to be changed to possbily "Upgrade of LDAP overwrites
exisitng database". That is the only thing that I can think of that has happened.

Thanks for the help

Comment 18 Simo Sorce 2007-05-21 21:24:29 UTC
I am sorry this happened.
I will close this bug as it is not a samba bug, would you mind opening a new one
for openLdap ?
There you can refer to this bug for more background.

Thanks.