Commit Graph

68 Commits

Author SHA1 Message Date
Sami Kerola
07b12154dc
login: tidy up manual page
Add defaults to couple logindefs, and generally clean up  manual page a
little bit.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-12-03 20:09:15 +00:00
Sami Kerola
3ea54b843c
man: make tilde and caret characters to render correctly
As mentioned in 'Generating optimal glyphs' title in the manual page
mentioned in reference:

    Where a proper caret (^) that renders well in both a terminal and PDF is
    required, use "\(ha".

    Using a naked "~" character results in a poor rendering in PDF.  Instead
    use "\(ti".

Reference: https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-11-14 15:22:34 +00:00
Thayne McCombs
df09e21c24 login: add option to not reset username on each attempt
[kzak@redhat.com: - use different message on failed password]

Addresses: https://github.com/karelzak/util-linux/pull/1138
Addresses: https://github.com/karelzak/util-linux/issues/6
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-09-11 12:20:37 +02:00
leeceeksdee
0c4bf7913c
her -> their 2020-08-28 19:19:23 +02:00
leeceeksdee
40d249fca0
his -> their 2020-08-28 19:15:34 +02:00
leeceeksdee
c2fcf2f797
he -> they 2020-08-28 19:11:45 +02:00
Michael Kerrisk (man-pages)
4f68c8b179 Manual pages: various: reword "allow(s) to"
The wording "allow(s) to" is not grammatical English. Reword various
pages to use a more correct form such "can be use to" or "allows
the [noun] of".

Aklong the way, fix a few nearby wording errors in some pages.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-07-14 14:08:54 +02:00
Michael Kerrisk (man-pages)
10fa311d3e Manual pages: login.1: various minor wording fixes
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-07-14 13:58:59 +02:00
Michael Kerrisk (man-pages)
62dcaec071 Manual pages: login.1: formatting fixes
Bold for command names; italic for pathnames, etc.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-07-14 13:58:59 +02:00
Michael Kerrisk (man-pages)
f0fd830ea8 Manual pages: login.1: SEE ALSO: add utmp(5), lastlog(8)
utmp and lastlog are referred to in the manual page, and thus deserve a
cross references in SEE ALSO.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-07-14 13:58:59 +02:00
Karel Zak
f0833edc12 login: fix -f description in the man-page
Addresses: https://github.com/karelzak/util-linux/issues/1053
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-29 14:50:36 +02:00
Michael Kerrisk (man-pages)
ade04bb89c Manual pages: order AUTHORS / COPYRIGHT / SEE ALSO / AVAILABILITY consistently
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the AUTHORS, COPYRIGHT, SEE ALSO, and
AVAILABILITY sections are always placed at the end of the page.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-22 10:25:49 +02:00
Michael Kerrisk (man-pages)
a8d0d330cf Manual pages: Standardize on AUTHORS as section title
There is quite some value (in terms of readability and user
expectations) if consistent names are used for the sections
within manual pages. This patch is one of a series to bring
about this consistency.

In the Linux man-pages project, I long ago did away with the
AUTHOR(S) section, but I realize some projects like to keep this.

But, let's make sure that the section is consistently titled
across pages. Currently we have AUTHOR (47) or AUTHORS (41).
Let's standardize on the latter (which is also what is
suggested in man-pages(7)).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-20 12:56:12 +02:00
Michael Kerrisk (man-pages)
5a82980632 docs: (man) remove double quotes (") in .SH lines
Using double quotes in .SH lines containing multiple words is unneeded,
and in any case is not consistently done in the util-linux manual pages,
where double quotes are used in only around half of the cases.
(This usage was long ago elminated in the man-pages project, with
no ill effects reported to date.)

Remove these quotes, so that .SH lines are more uniform, in preparation
for some (more easily) scripted doiscovery of consistency problems in
(and possibly global fixes to) the manual pages.

Other than stripping the double quotes, this patch makes no changes to
the content of the manual pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 12:15:34 +02:00
Karel Zak
e327a7acd6 agetty: extend --issue-file to support multiple paths
The current default behavior is to print the first issue file/dir and
all alternative locations are used as a backup solution only. If something
is found than the rest is ignored. The --issue-file allow to overwrite
this default behavior, but currently it supports only one file/dir.

This patch extend --issue-file to support ':' separated list of paths
and *all* the files (if exist and no empty) in the list are printed.

 agetty --issue-file=/etc/issue:/etc/issue.d:/run/issue:/run/issue.d:/usr/lib/issue:/usr/lib/issue.d

Addresses: https://github.com/karelzak/util-linux/issues/1041
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-19 10:55:20 +02:00
Karel Zak
72b155ea6e login: keep default MOTD_FILE= backwardly compatible
It seems that directories like /etc/motd.d are already used by PAM or
by another stuff. Let's keep it in admin/distro hands and do not
change the current default.

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-12 15:37:39 +02:00
Karel Zak
9789d21a96 login: add MOTD_FIRSTONLY=
This login.defs option allow to configure login to be more compatible
with pam_motd.

Addresses: https://github.com/karelzak/util-linux/issues/1034
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-12 15:21:21 +02:00
Karel Zak
5a528e2c6f login: add support for directories in MOTD_FILE=
The current standard is to use directories to make it easy for
distributions to share resources. This patch also add /etc/motd.d
and /run/motd.d to the default MOTD_FILE=.

Addresses: https://github.com/karelzak/util-linux/issues/10341
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-12 14:20:54 +02:00
Bjarni Ingi Gislason
eb02489380 man pages: Add a comma after "e.g." and "i.e."
Add a comma (,) after "e.g." and "i.e.", or use English words
(man-pages(7) [package "manpages"]).

  Abbreviation points should be protected (usually with the
non-printing, zero width character '\&') from being interpreted as an
end of sentence, if they are not, and that independent of their current
place on the line.

  This is important when typing, as one does not usually know in
advance when the editor jumps to a new line.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2019-12-17 12:32:43 +01:00
Karel Zak
1a83c00d88 login: add support for login.defs(5) LASTLOG_UID_MAX
This new variable allows to keep lastlog file small and filter out
things like huge nfsnobody UIDs.

The variable is also supported by shadow-utils (adduser, etc.).

Addresses: https://github.com/shadow-maint/shadow/pull/142/
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-01-11 12:16:00 +01:00
Stanislav Brabec
86f42e5a2a su-common.c: prefer ENV_SUPATH over ENV_ROOTPATH
ENV_SUPATH and ENV_ROOTPATH are equivalent and ENV_ROOTPATH takes
precedence in both login and su. It makes no sense. More logical would be
precedence of ENV_SUPATH in su and ENV_ROOTPATH in login.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2019-01-10 12:26:38 +01:00
Bjarni Ingi Gislason
0bb7e904d7 man: Use the correct macro for a font change of one argument
Use the correct macro (I, B) for the font change of one argument, not
those that are used for alternating two fonts, like "BR", "IR", "RB",
or "RI".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2018-05-23 10:43:27 +02:00
Karel Zak
e6b32e7d1a login: add LOGIN_PLAIN_PROMPT to login.defs
We have command line option -H to disable hostname in login prompt.
Unfortunately, in same cases (e.g. telnetd) it's impossible to specify
login(1) command line options due to hardcoded execl()...

This patch introduces LOGIN_PLAIN_PROMPT boolean for /etc/login.defs
to suppress hostname in the prompt.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-04 12:31:29 +01:00
Ruediger Meier
7491906df6 login: add --help and --version
Also we don't print the usage text on stderr anymore.

Note, the usage text could be improved, currently it
does not describe any options. I have only added a
pointer to the man page.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-22 21:34:54 +02:00
Sébastien Helleu
d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Michael Kerrisk
46f057ed37 docs: various pages: Format pathnames as italic (.I)
In the majority of pages, pathnames are formatted as Italic,
which is the norm. However, there are several cases where they
are formatted as bold. This patch fixes a number of those
exceptions.

Signed-off-by: Michael Kerrisk <mtk.man-pages@gmail.com>
2016-12-09 13:45:09 +01:00
Ruediger Meier
223939d95b misc: spelling, always use "cannot" instead of "can not"
Just to be consistent ...

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-11-30 14:56:50 +01:00
Michael Kerrisk (man-pages)
42632a90c1 Correctly format page cross references
Most pages in util-linux follow the standard convention
of formatting page cross references in bold. Fix the
few exceptions that use italic.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Michael Kerrisk (man-pages)
f053ff1e3a Place SEE ALSO entries in order
This patch does only the following:

* Order SEE ALSO entries first by section name, then alphabetically
  within section
* Adds one or two missing commas in SEE ALSO lists
* Removes one or two periods that were (inconsistently) used
  at the end of SEE ALSO lists.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Sebastian Rasmussen
d35df4db5b docs: Fix various typos
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
2016-05-31 23:40:21 +02:00
Ondrej Oprala
3aca66a54d login: fix minor typos in the man page
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-04-07 12:38:17 +02:00
Benno Schulenberg
b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Benno Schulenberg
9c91fc03ae docs: make the section AVAILABILITY always come last in man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-03-20 14:09:24 +01:00
Karel Zak
91984e938e agetty: replace perms 660 to 620
... the default is root:tty 620

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-02 08:27:32 +01:00
Ville Skyttä
ddfc5ed6f2 docs: man page syntax fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2012-07-16 18:09:21 +02:00
Sami Kerola
39c877f1a5 docs: clean up login.1 manual
PATH contents for users & root in DESCRIPTION section where wrong,
and couple default values where missing.  Rest of the change is about
making the groff, and the output, to look good.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-02 15:11:27 +02:00
Dave Reisner
fed52fd5ca login: add USER to initial environment
Add this value from the passwd struct to the environment, as it is
expected by shells, and generally useful to users.

This also clarifies a poorly worded sentence in the vicinity of the
manpage change.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-13 12:24:25 +01:00
Karel Zak
fab1f6717e login: add LOGIN_RETRIES, cleanup retries check code
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-10 14:47:59 +01:00
Sami Kerola
0effd19e00 login: add version printing option
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:37:19 +01:00
Karel Zak
f950752b90 login: clean FAIL_DELAY usage
... with this patch: login(1) always uses sleep(FAIL_DELAY) before
exit() if user is not authenticated or his PAM session is not fully
initialized.

Note that user has three attempts to write his password before
login(1) is terminated.

Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-07 11:04:44 +01:00
Karel Zak
ee74f262bc login: cosmetic changes in docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:18 +02:00
Karel Zak
9f7293ea88 login: use ENV_PATH and ENV_{ROOT,SU}PATH from login.defs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:18 +02:00
Karel Zak
92e386cac1 login: add -H option for compatibility with Suse
Note that our login(1) uses hostname without domain, so:

	"foo login: "

this is compatible with the default agetty(8) behavior.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00
Karel Zak
cea8ec53de login: use LOG_UNKFAIL_ENAB from login.defs, improve logging
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00
Karel Zak
91d0a91357 login: use DEFAULT_HOME from login.defs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00
Karel Zak
84d3c9ffb3 login: use HUSHLOGIN_FILE from login.defs
Note that Suse login(1) does not use any default for HUSHLOGIN_FILE.
We use /etc/hushlogins and ~/.hushlogin as default.

The another difference is that *empty* global (e.g. /etc/hushlogins)
means that hushed mode will be enabled for all accounts.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00
Karel Zak
45d0a30ea3 login: use TTYGROUP from login.defs
Note that Suse login(1) does not use any default for TTYGROUP, it
means that TTYGROUP has to be explicitly defined otherwise user\'s
primary group is used.

The util-linux login(1) uses 'tty' group name as a default value.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00
Karel Zak
738246edba login: use TTYPERM from login.defs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00
Karel Zak
ca5ee2a83d login: use FAIL_DELAY from login.defs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00
Karel Zak
9abd9cded9 login: use LOGIN_TIMEOUT from login.defs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:17 +02:00