Bug 1888990

Summary: Update smb.conf man pages to include information about restarting smbd to implement changes
Product: Red Hat Enterprise Linux 8 Reporter: Josip Vilicic <jvilicic>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: sssd-qe <sssd-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.3CC: abokovoy, alexander.kohr, asn, dkarpele, gdeschner, jarrpa
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: dkarpele: needinfo-
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: samba-4.13.2-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 14:59:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 5 Alexander Kohr 2020-11-09 15:21:55 UTC
It was suggest by "Wooten, Joel" in redhat case 02761586 that I should join this private bugzilla case to start a dialog with the developers about comments about the documentation, post these changes/realated to this buzilla.  If this is not the correct/ideal place please let me know.  

This is a a slight modification of a cut and paste directly from the RedHat ticket, 


Based on the git page things morphed a bit from what is here {in the redhat case}, as they mention reloading switched from every minute to 3 minutes back in 2009 but never made it into the smbd man page. The git commit URL shows them changing a bunch of other related documentation, and those change being committed for Samba 4.12 and samba 4.13. 

This is a huge improvement. I especially like that the reloading information is the first section after the synopsis, I feel like had it been there before, this ticket would never have existed. 

That being said unless I am looking at the wrong version of the document,  I think some more clarification in smb.conf documentation might be helpful. For the rest of this  discussion block,  I am looking at the smb.conf located at  https://git.samba.org/?p=samba.git;a=blob;f=docs-xml/manpages/smb.conf.5.xml;h=c4387187ecc5803cf038617715d1b5daf6c928be;hb=e32846f0692df44b4ee929c5ed6ba1de88ec4bd2. 

Current line 46  says "The Samba suite's server daemons reload their configuration when requested"  but fails to mention that it is automatically reloaded every 3 minutes . I think the just quoted sentence should be changed to something similar to "The Samba suite's server daemons reload their configuration every 3 minutes automatically or by manually reload"  or to not have another place to change documentation in the case of a future change of the reload time interval,  something like "The Samba suite's server daemons reload their configuration automatically at a regular time interval or sooner by a manually reload"

The documentation might be a bit better if in the newly added sentence, to smb.conf (~lines 54/55),  "To request Samba server daemons to refresh their configuration , please use smbcontrol utility" the word refresh were replaced with reload to be consistent with the terminology of the command as documented in the smbcontol binary.  

I really think in the smb.conf man page's WARNINGS section (currently starting on line 881), there should be something added about saving edits to the file and it being auto reloading.  Maybe something along the lines of "It is highly recommended that all edits first be made to a copy of smb.conf file and then after completion and passing a testparm, moved into the smb.conf file location, as the Samba suite's server daemons are programed to regularly reloaded their configuration files, and any incomplete/incorrect  configuration saved in smb.conf could automatically be implemented, potentially prevent new connections and/or starting new connections with the incomplete configuration that will persist until the client connection is restarted."    This could probably be better worded.  Note: I purposely didn't say how many minutes so there is one less things to edit should they decide to change the auto-reload interval again.

Once again please let me know if there is a better place to post this comment about the documentation.

Comment 6 Alexander Bokovoy 2020-11-09 15:43:57 UTC
(In reply to Alexander Kohr from comment #5)
> Current line 46  says "The Samba suite's server daemons reload their
> configuration when requested"  but fails to mention that it is automatically
> reloaded every 3 minutes . I think the just quoted sentence should be
> changed to something similar to "The Samba suite's server daemons reload
> their configuration every 3 minutes automatically or by manually reload"  or
> to not have another place to change documentation in the case of a future
> change of the reload time interval,  something like "The Samba suite's
> server daemons reload their configuration automatically at a regular time
> interval or sooner by a manually reload"

Please see the whole commit context:
https://git.samba.org/?p=samba.git;a=commitdiff;h=e32846f0692df44b4ee929c5ed6ba1de88ec4bd2;hp=a6ff80cdc1b16f32716bc54c052e8fa8b149b4f9

These are the changes I did upstream after discussing with other developers. We intentionally put the references to individual daemons' man pages instead of mentioning the refresh times in the smb.conf(5). The behavior is different in different daemons and it is better to consult specific man pages for those daemons. It also gives us an opportunity to make users aware of those individual manual pages.

If you want to add more comments on top of the existing change, please add them to https://bugzilla.samba.org/show_bug.cgi?id=14538 which is upstream ticket for this issue.

Comment 10 Alexander Kohr 2020-11-17 15:56:27 UTC
I have Joined https://bugzilla.samba.org/show_bug.cgi?id=14538  and am making additional comments there.

Comment 13 errata-xmlrpc 2021-05-18 14:59:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: samba security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1647