Bug 1804766 - login.defs man page has incorrect information for login(1)
Summary: login.defs man page has incorrect information for login(1)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: shadow-utils
Version: 8.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 8.0
Assignee: Iker Pedrosa
QA Contact: shridhar
URL:
Whiteboard: sync-to-jira qetodo
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-19 15:16 UTC by Lark Gordon
Modified: 2021-05-18 15:00 UTC (History)
6 users (show)

Fixed In Version: shadow-utils-4.6-12.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:59:58 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:1650 0 None None None 2021-05-18 15:00:03 UTC

Internal Links: 1884702

Description Lark Gordon 2020-02-19 15:16:35 UTC
Description of problem:
The login man page for util-linux references the option "LOGIN_STRING", which is not available in the version of login that we ship.

How reproducible:
this issue appears in the manpage for RHEL 7 and 8.

Additional info:

It appears LOGIN_STRING isn't used at all.

The login.defs config file, the man page for it, and a login binary come from shadow-utils source.

We don't actually ship the login binary that is in shadow-utils source, but we do ship the other files.

A login binary also exists in the util-linux source, without the corresponding login.defs or login.defs man page, and that is what we actually ship for the binary. The login binary that is in util-linux does not support LOGIN_STRING at all.

You can see where the shadow-utils login version is removed during the build stage so it doesn't ship in the rpm.

        shadow-utils.spec:rm $RPM_BUILD_ROOT/%{_bindir}/login

'man login', which comes from util-linux, includes the valid login.defs variables so possibly just removing the login.defs man page from shadow-utils would be enough.

Comment 1 Karel Zak 2020-02-19 16:05:13 UTC
Well, I think login(1) man page from util-linux is correct and contains only valid information ;-) 

The problem is login.defs(5) man page where are all very commonly used options. Unfortunately, not all of the options are usable/valid. The config file login.defs is not login(1) specific, it's used by more tools.

IMHO it would be enough to add to the beginning of the login.defs(5) man page a warning "This man page is generic and some of the options may be unsupported by currently installed tools. For example see login(1) for login specific options, etc.".

Comment 3 Iker Pedrosa 2020-04-21 14:39:45 UTC
After reviewing it my proposal would be to include the following in login.defs description:

Please also take into account that this man page is generic and some of the options may be unsupported by
currently installed tools. In case of doubt check the section called “CROSS REFERENCES” and the section
called “SEE ALSO”. For example see login(1) for login specific options such as LOGIN_STRING.


What do you think?

Comment 5 Iker Pedrosa 2020-09-14 07:11:41 UTC
It needs to be discussed but my idea is to include the fix proposed in comment 3 in RHEL8.4.

Comment 8 shridhar 2020-11-10 11:47:30 UTC
Checked with:

shadow-utils-4.6-12

]# rpm -Uvh shadow-utils-4.6-12.el8.x86_64.rpm 
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:shadow-utils-2:4.6-12.el8        ################################# [ 50%]
Cleaning up / removing...
   2:shadow-utils-2:4.6-11.el8        ################################# [100%]


]# man login.defs
<snip>

       Please also take into account that this man page is generic and some of the options may be unsupported by currently installed tools. In case of doubt check the section called “CROSS REFERENCES” and
       the section called “SEE ALSO”. For example see login(1) for login specific options such as LOGIN_STRING.

</snip>

Marking verified.

Comment 11 shridhar 2020-11-30 14:12:35 UTC
d]# rpm -q shadow-utils
shadow-utils-4.6-12.el8.x86_64

]# man login.defs
<snip>
       Please also take into account that this man page is generic and some of the options may be unsupported by currently installed tools. In case of doubt check the section called “CROSS REFERENCES” and
       the section called “SEE ALSO”. For example see login(1) for login specific options such as LOGIN_STRING.

       The following configuration items are provided:
</snip>
marking verified.

Comment 13 errata-xmlrpc 2021-05-18 14:59:58 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 (shadow-utils 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/RHBA-2021:1650


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