Bug 72188 - net/samba: secrets.tdb is removed when it really should not be
Summary: net/samba: secrets.tdb is removed when it really should not be
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-30 09:30 UTC by Andriy Gapon
Modified: 2004-10-19 02:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Gapon 2004-09-30 09:30:28 UTC
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'

Fix: 

sorry
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
Comment 1 Andriy Gapon 2004-10-18 14:43:48 UTC
The problem is still there for samba-2.2.12 port.

-- 
Andriy Gapon
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2004-10-18 19:30:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

I will take care of it.
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2004-10-19 02:45:45 UTC
State Changed
From-To: open->closed

Fix is committed, thanks.