Bug 243766 - whenever I update samba, the file /etc/samba/smbpasswd is zeroed and the content is lost
Summary: whenever I update samba, the file /etc/samba/smbpasswd is zeroed and the cont...
Alias: None
Product: Fedora
Classification: Fedora
Component: samba   
(Show other bugs)
Version: 7
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Simo Sorce
QA Contact:
Keywords: Reopened
Depends On:
TreeView+ depends on / blocked
Reported: 2007-06-11 19:11 UTC by Miguel
Modified: 2007-11-30 22:12 UTC (History)
4 users (show)

Fixed In Version: 3.0.25b-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-07-05 19:16:18 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Miguel 2007-06-11 19:11:03 UTC
Description of problem:
whenever I update samba, the file /etc/samba/smbpasswd is zeroed and the content
is lost.

Version-Release number of selected component (if applicable):

How reproducible: updating samba

Steps to Reproduce:
1. download the samba package
2. install it using rpm

Actual results: the file /etc/samba/smbpasswd is zeroed

Expected results: to mantain the original with the passwords

Additional info:

Comment 1 Jonathan Kamens 2007-06-12 03:47:56 UTC
I'm encountering this as well.  This is a serious problem!  Losing password data
is a Bad Thing!

Comment 2 Guenther Deschner 2007-06-12 14:38:28 UTC
Looking into this.

Comment 3 Guenther Deschner 2007-06-12 14:59:53 UTC
For security reasons, it was required to move "smbpasswd" from /etc/samba to
/var/lib/samba/private. The update should correctly have taken care of that.

Can you please verify if pdbedit still can list your smbpasswd accounts from the
new location with "pdbedit -L" ? 

Comment 4 Jonathan Kamens 2007-06-12 16:15:27 UTC
Does the update also edit smb.conf to reflect where the file was moved to, or 
does it assume (incorrectly) that the default location is being used, i.e., is 
nto specified explicitly in smb.conf.  If it makes that assumption, then 
perhaps that's the problem, because my config file does specify the "smb passwd 
file" setting explicitly.

Comment 5 Miguel 2007-06-12 18:39:28 UTC
The same happens with me. I think it is a litte "extreme" to modify the place
where smbpasswd is without, at least, give one warning like when a file is moved
to .rpmsave

Comment 6 Guenther Deschner 2007-06-13 08:17:59 UTC
No, the upgrade process currently doesn't handle that, can you please provide an
example "smb passwd file" parameter from your smb.conf so that I can work on a
proper fix ?

Comment 7 Jonathan Kamens 2007-06-13 14:36:02 UTC
RTFM.  Search for "smb passwd file" in the smb.conf man page.

Comment 8 Simo Sorce 2007-06-13 14:58:15 UTC
would you mind being a bit more collaborative and abstain from totally useless

Your passwords are not lost, they are just located elsewhere.
I did a mistake in not checking the "smb passwd file" at this time, so we just
want to make sure we will handle it properly next time, therefore we are asking
for you or Miguel to post your smb.conf file.
We do perfectly now how to read a man page, we just ask the configuration file
to evaluate if there is something else that may have been forgotten.

Comment 9 Nerijus Baliūnas 2007-06-14 00:01:58 UTC
It's in smb.conf from samba-common-3.0.21b-2.i386.rpm (original FC5) for example:
;  encrypt passwords = yes
;  smb passwd file = /etc/samba/smbpasswd

You have to uncomment it of course.

Comment 10 Guenther Deschner 2007-06-18 13:37:50 UTC
Thanks for the example, Nerijus.

Simo has a possible fix, reassigning to him.

Comment 11 Simo Sorce 2007-06-26 18:40:06 UTC
OK I am committing code to make sure we don't move these files if they are
explicitly referenced in the current smb.conf

Comment 12 Fedora Update System 2007-06-27 03:51:10 UTC
samba-3.0.25b-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Jonathan Kamens 2007-06-29 15:27:20 UTC
This isn't fixed.  Updating to samba-3.0.25b-2.fc8 once again renamed my
/etc/samba/smbpasswd file to /var/lib/samba/private.  I see no evidence in the
samba-common postinstall script that this problem has been fixed, even though
this bug ticket and the samba-common changelog claim that it has.

Comment 14 Simo Sorce 2007-06-29 19:43:56 UTC
thanks for catching this, for some reason the patch got applied to F-7's spec
file but not to rawhide file. I've just committed a change and started building
a new package.

Comment 15 Fedora Update System 2007-07-05 19:15:57 UTC
samba-3.0.25b-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.