From nobody@FreeBSD.org  Thu Sep 30 08:27:19 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1E31B16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Sep 2004 08:27:19 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 12CB743D31
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Sep 2004 08:27:19 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i8U8RITg044497
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Sep 2004 08:27:18 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i8U8RIW2044495;
	Thu, 30 Sep 2004 08:27:18 GMT
	(envelope-from nobody)
Message-Id: <200409300827.i8U8RIW2044495@www.freebsd.org>
Date: Thu, 30 Sep 2004 08:27:18 GMT
From: Andriy Gapon <avg@icyb.net.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: net/samba: secrets.tdb is removed when it really should not be
X-Send-Pr-Version: www-2.3

>Number:         72188
>Category:       ports
>Synopsis:       net/samba: secrets.tdb is removed when it really should not be
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    dinoex
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 30 08:30:28 GMT 2004
>Closed-Date:    Tue Oct 19 03:46:16 CEST 2004
>Last-Modified:  Tue Oct 19 03:46:16 CEST 2004
>Originator:     Andriy Gapon
>Release:        5.2.1-RELEASE-p10
>Organization:
>Environment:
5.2.1-RELEASE-p10 i386
samba-2.2.11_1
>Description:
Consider a samba server that provides read-only access to all authenticated users in a certain windows domain.
There is no need to add any users to smbpasswd, so it is identical smbpasswd.default.
On the other hand the samba server uses security=domain mode and it is 
added to be a member of windows domain by running 
"smbpasswd -j DOMAIN -r PDC"
so secrets.tdb is not identical any more to original one (created from smbpasswd.default).
But during samba reinstallation/upgrade secrets.tdb is removed and the
samba server in question is unable to authenticate connecting users.
This happens because of this line in package registration:
UNEXEC '/usr/bin/cmp -s %D/private/smbpasswd %D/private/smbpasswd.default && /bin/rm -f %D/private/smbpasswd %D/private/secrets.tdb || true'
>How-To-Repeat:
1. install samba
2. configure it to use security=domain and windows password server (do not change smbpasswd!)
3. make sure windows users can connect and access shares on the samba server
4. deinstall/reinstall samba (e.g. portupgrade -f)
5. see that windows users can not connect anymore, because secrets.tdb has changed and does not contain machine account password
>Fix:
sorry
>Release-Note:
>Audit-Trail:

From: Andriy Gapon <avg@icyb.net.ua>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/72188: net/samba: secrets.tdb is removed when it really
 should not be
Date: Mon, 18 Oct 2004 16:43:48 +0300

 The problem is still there for samba-2.2.12 port.
 
 -- 
 Andriy Gapon
Responsible-Changed-From-To: freebsd-ports-bugs->dinoex 
Responsible-Changed-By: dinoex 
Responsible-Changed-When: Mon Oct 18 20:30:55 CEST 2004 
Responsible-Changed-Why:  
I will take care of it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72188 
State-Changed-From-To: open->closed 
State-Changed-By: dinoex 
State-Changed-When: Tue Oct 19 03:45:45 CEST 2004 
State-Changed-Why:  
Fix is committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72188 
>Unformatted:
