Basically, debian bug report - https://bugs.debian.org/1022945 - tells it all: The smbclient(1) manpage contains some multiple entries in the OPTIONS section regarding the SYNOPSIS list. Here are the two detected cases: 71: -m|--max-protocol protocol 72- This allows the user to select the highest SMB protocol level that smbclient will use to connect to the server. By default this is set to highest available SMB3 and 259: -m|--max-protocol=MAXPROTOCOL 260- The value of the parameter (a string) is the highest protocol level that will be supported by the client. 76: -P|--machine-pass 77- Make queries to the external server using the machine account of the local server. and 335: -P|--machine-pass 336- Use stored machine account password. Moreover the entries in the OPTIONS section should be more consistent to the SYNOPSIS syntax.
There are two things going on here. First, the OPTIONS includes items also included in &popt.autohelp; &cmdline.common.samba.client; &cmdline.common.connection; &cmdline.common.credentials; from docs-xml/build/DTD/samba.entities A patch to take out the duplicates is easy, for each duplicate seen in the generated manpage, remove from the XML so only the entity reference remains. The XML is in docs-xml/manpages/smbclient.1.xml That is the easy patch. The second issue is the not-matching synopsis. Perhaps this is really a second bug, if we are pedantic. Ideally both should match, and be tested to match, the --help output, but otherwise just fix manually.
(In reply to Andrew Bartlett from comment #1) This is actually not so simple. Let's take the --max-protocol option as an example. The smbclient-specific description is quite verbose with explanations: <varlistentry> <term>-m|--max-protocol protocol</term> <listitem><para>This allows the user to select the highest SMB protocol level that smbclient will use to connect to the server. By default this is set to highest available SMB3 protocol version. To connect using SMB2 or SMB1 protocol, use the strings SMB2 or NT1 respectively. Note that to connect to a Windows 2012 server with encrypted transport selecting a max-protocol of SMB3 is required. </para></listitem> </varlistentry> while the description coming from the common &cmdline.common.samba.client; is terse and refers to a generic client, - as it should be. In this case of smbclient.1 manpage, it is the common description which should be removed, not the smbclient-specific one, and this is a bit more problematic, as &cmdline.common.samba.client; should be recursively expanded to omit the &cmdline.common.connection.max-protocol; definition.
(In reply to Michael Tokarev from comment #2) I would be quite comfortable with a merged version, just changing "smbclient" to "this client tool" or so. smbcacls needs it as well, perhaps that text might be useful inspiration? Our manpages are not as well maintained as we would like, we should go for good common elements over perfect, as otherwise all the special cases will just bitrot again.