Util-Linux package development
 help / color / mirror / Atom feed
* lslogins --user-accs
@ 2015-07-06 21:37 Mantas Mikulėnas
  2015-07-15 14:23 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Mantas Mikulėnas @ 2015-07-06 21:37 UTC (permalink / raw)
  To: util-linux

Trying out `lslogins`, noticed two problems (?) with the --user-accs option:

1) The manpage documents --user-accs[=threshold] to override the
"hardcoded" minimum of 1000, but the code doesn't actually /accept/ a
parameter (it reads the actual threshold from login.defs).

2) While not documented, --user-accs also applies the /maximum/ uid
limit. I noticed this on a system that has "UID_MAX 19999" because
LDAP-based accounts start at 20000, which means `lslogins -u` will show
local users but not LDAP ones.

~

Also the "Last logs:" output seems to have ^A / 0x01 in random places:

  00:35:14 krenew<^A>\x01[1295]: renewing credentials

On another system:

  Feb07/00:05 sshd[3009657]: Received disconnect from 78.60.211.195: 11:
disconnected by user<^A>

-- 
Mantas Mikulėnas <grawity@gmail.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: lslogins --user-accs
  2015-07-06 21:37 lslogins --user-accs Mantas Mikulėnas
@ 2015-07-15 14:23 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2015-07-15 14:23 UTC (permalink / raw)
  To: Mantas Mikulėnas; +Cc: util-linux

On Tue, Jul 07, 2015 at 12:37:49AM +0300, Mantas Mikulėnas wrote:
> Trying out `lslogins`, noticed two problems (?) with the --user-accs option:
> 
> 1) The manpage documents --user-accs[=threshold] to override the
> "hardcoded" minimum of 1000, but the code doesn't actually /accept/ a
> parameter (it reads the actual threshold from login.defs).
> 
> 2) While not documented, --user-accs also applies the /maximum/ uid
> limit. I noticed this on a system that has "UID_MAX 19999" because
> LDAP-based accounts start at 20000, which means `lslogins -u` will show
> local users but not LDAP ones.
 
For now I have fixed the man page and removed [=threshold] and added
hint about uids ranges specified by /etc/login.defs.

Maybe the ideal solution would be to add optional parameter

    --user-accs[=min:max]
    --system-accs[=min:max]


> Also the "Last logs:" output seems to have ^A / 0x01 in random places:
> 
>   00:35:14 krenew<^A>\x01[1295]: renewing credentials
> 
> On another system:
> 
>   Feb07/00:05 sshd[3009657]: Received disconnect from 78.60.211.195: 11:
> disconnected by user<^A>

Hmm... we read this from systemd journal by sd_journal_get_data() and
print it without any change.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-15 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 21:37 lslogins --user-accs Mantas Mikulėnas
2015-07-15 14:23 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox