[Pkg-shadow-devel] Bug#1089512: chage.1: Some remarks about this man page

Bjarni Ingi Gislason bjarniig at simnet.is
Sun Dec 8 09:06:04 GMT 2024


Package: passwd
Version: 1:4.16.0-5
Severity: minor
Tags: patch

   * What led up to the situation?

     Checking for defects with

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page"

  [Use "groff -e ' $' <file>" to find trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?

troff:<stdin>:66: warning: trailing space in the line

   * What outcome did you expect instead?

     No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.11.10-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages passwd depends on:
ii  base-passwd     3.6.5
ii  libacl1         2.3.2-2+b1
ii  libattr1        1:2.5.2-2
ii  libaudit1       1:4.0.2-2
ii  libbsd0         0.12.2-2
ii  libc6           2.40-4
ii  libcrypt1       1:4.4.36-5
ii  libpam-modules  1.5.3-7+b1
ii  libpam0g        1.5.3-7+b1
ii  libselinux1     3.7-3+b1
ii  libsemanage2    3.7-2+b1
ii  login.defs      1:4.16.0-5

Versions of packages passwd recommends:
ii  sensible-utils  0.0.24

passwd suggests no packages.

-- no debconf information
-------------- next part --------------
Input file is chage.1

  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8  <man page>

  The same goes for man pages that are used as an input.

  For a style guide use

  mandoc -T lint

-.-

  So any 'generator' should check its products with the above mentioned
'groff', 'mandoc',  and additionally with 'nroff ...'.

  This is just a simple quality control measure.

  The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Input text line longer than 80 bytes.

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  Not beginning each input sentence on a new line.
Lines should thus be shorter.

  See man-pages(7), item 'semantic newline'.

-.-

The difference between the formatted output of the original and patched file
can be seen with:

  nroff -mandoc <file1> > <out1>
  nroff -mandoc <file2> > <out2>
  diff -u <out1> <out2>

and for groff, using

"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - "

instead of 'nroff -mandoc'

  Add the option '-t', if the file contains a table.

  Read the output of 'diff -u' with 'less -R' or similar.

-.-.

  If 'man' (man-db) is used to check the manual for warnings,
the following must be set:

  The option "-warnings=w"

  The environmental variable:

export MAN_KEEP_STDERR=yes (or any non-empty value)

  or

  (produce only warnings):

export MANROFFOPT="-ww -b -z"

export MAN_KEEP_STDERR=yes (or any non-empty value)


-.-.

Output from "mandoc -T lint  chage.1 ": (shortened list)

     12 input text line longer than 80 bytes
      7 skipping paragraph macro

-.-.

Output from "test-groff -mandoc -t -ww -b -z chage.1 ": (shortened list)

      1 trailing space in the line

-.-.

Output from "mandoc -T lint  chage.1 ":

mandoc: chage.1:36:2: WARNING: skipping paragraph macro: PP after SH
mandoc: chage.1:39:197: STYLE: input text line longer than 80 bytes: command changes the ...
mandoc: chage.1:41:2: WARNING: skipping paragraph macro: PP after SH
mandoc: chage.1:48:200: STYLE: input text line longer than 80 bytes: Set the number of da...
mandoc: chage.1:57:339: STYLE: input text line longer than 80 bytes: Set the date or numb...
mandoc: chage.1:91:101: STYLE: input text line longer than 80 bytes: Set the number of da...
mandoc: chage.1:93:159: STYLE: input text line longer than 80 bytes: option is the number...
mandoc: chage.1:119:182: STYLE: input text line longer than 80 bytes: is less than the cur...
mandoc: chage.1:141:88: STYLE: input text line longer than 80 bytes: Apply changes to con...
mandoc: chage.1:149:123: STYLE: input text line longer than 80 bytes: option is the number...
mandoc: chage.1:154:245: STYLE: input text line longer than 80 bytes: operates in an inter...
mandoc: chage.1:158:2: WARNING: skipping paragraph macro: PP after SH
mandoc: chage.1:163:274: STYLE: input text line longer than 80 bytes: The chage program wi...
mandoc: chage.1:167:129: STYLE: input text line longer than 80 bytes: program will also no...
mandoc: chage.1:175:113: STYLE: input text line longer than 80 bytes: option, which may be...
mandoc: chage.1:177:2: WARNING: skipping paragraph macro: PP after SH
mandoc: chage.1:182:2: WARNING: skipping paragraph macro: PP after SH
mandoc: chage.1:193:2: WARNING: skipping paragraph macro: PP after SH
mandoc: chage.1:218:2: WARNING: skipping paragraph macro: PP after SH

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

66:	  

-.-.

Wrong distance between sentences in the input file.

  Separate the sentences and subordinate clauses; each begins on a new
line.  See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").

  The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.

Remember coding: Only one command ("sentence") on each (logical) line.

E-mail: Easier to quote exactly the relevant lines.

Generally: Easier to edit the sentence.

Patches: Less unaffected text.

Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

N.B.

  The number of lines affected can be too large to be in a patch.

39:command changes the number of days between password changes and the date of the last password change\&. This information is used by the system to determine when a user must change their password\&.
48:Set the number of days since January 1st, 1970 when the password was last changed\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. If the
57:Set the date or number of days since January 1, 1970 on which the user\*(Aqs account will no longer be accessible\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.
91:Set the number of days of inactivity after a password has expired before the account is locked\&. The
93:option is the number of days of inactivity\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.
110:\fIMIN_DAYS\fR\&. A value of zero for this field indicates that the user may change their password at any time\&.
115:Set the maximum number of days during which a password is valid\&. When
119:is less than the current day, the user will be required to change their password before being able to use their account\&. This occurrence can be planned for in advance by use of the
136:directory\&. Only absolute paths are supported\&.
142:\fIPREFIX_DIR\fR\&. This option does not chroot and is intended for preparing a cross\-compilation target\&. Some limitations: NIS and LDAP users/groups are not verified\&. PAM authentication is using the host files\&. No SELINUX support\&.
147:Set the number of days of warning before a password change is required\&. The
154:operates in an interactive fashion, prompting the user with the current values for all of the fields\&. Enter the new value to change the field, or leave the line blank to use the current value\&. The current value is displayed between a pair of
163:The chage program will report only the information from the shadow password file\&. This implies that configuration from other sources (e\&.g\&. LDAP or empty password hash field from the passwd file) that affect the user\*(Aqs login will not be shown in the chage output\&.
167:program will also not report any inconsistency between the shadow and passwd files (e\&.g\&. missing x in the passwd file)\&. The

-.-.

Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.

N.B.

  The number of lines affected can be too large to be in a patch.


Line 39, length 197

command changes the number of days between password changes and the date of the last password change\&. This information is used by the system to determine when a user must change their password\&.

Line 48, length 200

Set the number of days since January 1st, 1970 when the password was last changed\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. If the

Line 57, length 339

Set the date or number of days since January 1, 1970 on which the user\*(Aqs account will no longer be accessible\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.

Line 91, length 101

Set the number of days of inactivity after a password has expired before the account is locked\&. The

Line 93, length 159

option is the number of days of inactivity\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.

Line 110, length 113

\fIMIN_DAYS\fR\&. A value of zero for this field indicates that the user may change their password at any time\&.

Line 119, length 182

is less than the current day, the user will be required to change their password before being able to use their account\&. This occurrence can be planned for in advance by use of the

Line 141, length 88

Apply changes to configuration files under the root filesystem found under the directory

Line 142, length 240

\fIPREFIX_DIR\fR\&. This option does not chroot and is intended for preparing a cross\-compilation target\&. Some limitations: NIS and LDAP users/groups are not verified\&. PAM authentication is using the host files\&. No SELINUX support\&.

Line 149, length 123

option is the number of days prior to the password expiring that a user will be warned their password is about to expire\&.

Line 154, length 245

operates in an interactive fashion, prompting the user with the current values for all of the fields\&. Enter the new value to change the field, or leave the line blank to use the current value\&. The current value is displayed between a pair of

Line 163, length 274

The chage program will report only the information from the shadow password file\&. This implies that configuration from other sources (e\&.g\&. LDAP or empty password hash field from the passwd file) that affect the user\*(Aqs login will not be shown in the chage output\&.

Line 167, length 129

program will also not report any inconsistency between the shadow and passwd files (e\&.g\&. missing x in the passwd file)\&. The

Line 175, length 113

option, which may be used by an unprivileged user to determine when their password or account is due to expire\&.


-.-.

Show if docman-to-man created this

4:.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

chage.1:48:Set the number of days since January 1st, 1970 when the password was last changed\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. If the
chage.1:57:Set the date or number of days since January 1, 1970 on which the user\*(Aqs account will no longer be accessible\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.
chage.1:65:	    chage \-E $(date \-d +180days +%Y\-%m\-%d)
chage.1:163:The chage program will report only the information from the shadow password file\&. This implies that configuration from other sources (e\&.g\&. LDAP or empty password hash field from the passwd file) that affect the user\*(Aqs login will not be shown in the chage output\&.
chage.1:167:program will also not report any inconsistency between the shadow and passwd files (e\&.g\&. missing x in the passwd file)\&. The

-.-.

No need for "\&" to be in front of a period (.) if not at the beginning of
a line.

10:.TH "CHAGE" "1" "11/15/2024" "shadow\-utils 4\&.16\&.0" "User Commands"
39:command changes the number of days between password changes and the date of the last password change\&. This information is used by the system to determine when a user must change their password\&.
48:Set the number of days since January 1st, 1970 when the password was last changed\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. If the
57:Set the date or number of days since January 1, 1970 on which the user\*(Aqs account will no longer be accessible\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.
91:Set the number of days of inactivity after a password has expired before the account is locked\&. The
93:option is the number of days of inactivity\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.
115:Set the maximum number of days during which a password is valid\&. When
119:is less than the current day, the user will be required to change their password before being able to use their account\&. This occurrence can be planned for in advance by use of the
136:directory\&. Only absolute paths are supported\&.
147:Set the number of days of warning before a password change is required\&. The
154:operates in an interactive fashion, prompting the user with the current values for all of the fields\&. Enter the new value to change the field, or leave the line blank to use the current value\&. The current value is displayed between a pair of
163:The chage program will report only the information from the shadow password file\&. This implies that configuration from other sources (e\&.g\&. LDAP or empty password hash field from the passwd file) that affect the user\*(Aqs login will not be shown in the chage output\&.
167:program will also not report any inconsistency between the shadow and passwd files (e\&.g\&. missing x in the passwd file)\&. The
179:/etc/login\&.defs

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -ww -z ":

troff:<stdin>:66: warning: trailing space in the line

-.-

  Additionally (general):

  There is no need to add a '\&' before a full stop (.) if it has a character
before it!


More information about the Pkg-shadow-devel mailing list