Bug 243766 - whenever I update samba, the file /etc/samba/smbpasswd is zeroed and the content is lost
whenever I update samba, the file /etc/samba/smbpasswd is zeroed and the cont...
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Simo Sorce
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-06-11 15:11 EDT by Miguel
Modified: 2007-11-30 17:12 EST (History)
4 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Miguel 2007-06-11 15:11:03 EDT
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-11 23:47:56 EDT
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 10:38:28 EDT
Looking into this.
Comment 3 Guenther Deschner 2007-06-12 10:59:53 EDT
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 12:15:27 EDT
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 14:39:28 EDT
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 04:17:59 EDT
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 10:36:02 EDT
RTFM.  Search for "smb passwd file" in the smb.conf man page.
Comment 8 Simo Sorce 2007-06-13 10:58:15 EDT
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-13 20:01:58 EDT
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 09:37:50 EDT
Thanks for the example, Nerijus.

Simo has a possible fix, reassigning to him.
Comment 11 Simo Sorce 2007-06-26 14:40:06 EDT
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-26 23:51:10 EDT
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 11:27:20 EDT
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 15:43:56 EDT
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 15:15:57 EDT
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.