summaryrefslogblamecommitdiffstats
path: root/login-utils/lslogins.1
blob: efe9c58a7de4619725137c5c6ac9cc0fe2588f6a (plain) (tree)
1
2
3
4
5
6
7
8






                                                               
                                                                       












                                                                          

                                                                              
   
                                    

                                                                





                                                         


                                 


                                                                                                                            


                                                                                                                                         
                      



                                                                         



                                                     






                                           
   

                                                                     



                            
                                 



                                                                                                                                                                      
                                

                                                                            
   
                               



                                                                                                                                                                


                                                                


                                    





                            

                                  
   
                            

                                     

                                                        
 














                                                                                                         
                      

             




                   




                                                                            
.\" Copyright 2014 Ondrej Oprala (ondrej.oprala@gmail.com)
.\" May be distributed under the GNU General Public License
.TH LSLOGINS "1" "April 2014" "util-linux" "User Commands"
.SH NAME
lslogins \- display information about known users in the system
.SH SYNOPSIS
.B lslogins
[\fIoptions\fR] [-s|-u[\fI=UID\fR]] [-g \fIGROUPS\fR] [-l \fILOGINS\fR]
.SH DESCRIPTION
.PP
Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /etc/passwd
and output the desired data.
.PP
Mandatory arguments to long options are mandatory for short options too.
.PP
The default action is to list info about all the users in the system.
.SH OPTIONS
.PP
Display info about existing users.
.TP
\fB\-a\fR, \fB\-\-acc\-expiration\fR
Display data about the date of last password change and the account expiration
date (see shadow(5) for more info).  (Requires root priviliges.)
.TP
\fB\-c\fR, \fB\-\-colon\-separate\fR
Separate info about each user with a colon instead of a newline.
.TP
\fB\-e\fR, \fB\-\-export\fR
Output data in the format of NAME=VALUE.
.TP
\fB\-f\fR, \fB\-\-failed\fR
Display data about the users' last failed login attempts.
.TP
\fB\-G\fR, \fB\-\-groups\-info\fR
Show information about groups.
.TP
\fB\-g\fR, \fB\-\-groups\fR=\fIGROUPS\fR
Only show data of users belonging to \fIGROUPS\fR. More than one group may be specified; the list has to be comma-separated.
.TP
\fB\-l\fR, \fB\-\-logins\fR=\fILOGINS\fR
Only show data of users with a login specified in \fILOGINS\fR. More than one login may be specified; the list has to be comma-separated.
.TP
\fB\-L\fR, \-\-last\fR
Display data containing information about the users' last login sessions.
.TP
\fB\-m\fR, \fB\-\-supp\-groups\fR
Show supplementary groups.
.TP
\fB\-n\fR, \fB\-\-newline\fR
Display each piece of information on a separate line.
.TP
\fB\-\-notruncate\fR
Don't truncate output.
.TP
\fB\-o , \-\-output \fIlist\fP
Specify which output columns to print.  Use
.B \-\-help
to get a list of all supported columns.
.TP
\fB\-p , \-\-pwd\fR
Display information related to login by password (see also \fB\-afR).
.TP
\fB\-r\fR, \fB\-\-raw\fR
Raw output (no columnation).
.TP
\fB\-s\fR, \fB\-\-system\-accs\fR
Show system accounts. These are by the default all accounts with UID below 1000 (non-inclusive), with the exception of either nobody or nfsnobody (UID 65534). The UID
treshold can also be specified explicitly (necessary for some distributions that allocate UIDs
starting from 100, 500 - or an entirely different value - rather than 1000).
.TP
\fB\-\-time-format\fR \fItype\fP
Display dates in short, full or iso format. The default is short, this time 
format is designed to be space efficient and human readable.
.TP
\fB\-u\fR, \fB\-\-user\-accs\fR
Show user accounts. These are by the default all accounts with UID above 1000 (inclusive), with the exception of either nobody or nfsnobody (UID 65534). The UID
treshold can also be specified explicitly (necessary for some distributions that allocate UIDs
starting from 100, 500 - or an entirely different value - rather than 1000).
.TP
\fB\-z\fR, \fB\-\-print0\fR
Delimit user entries with a nul character, instead of a newline.
.TP
\fB\-Z\fR, \fB\-\-context\fR
Display the users' security context.
.TP
\fB\-\-wtmp\-file \fIpath\fP
Alternate path for wtmp.
.TP
\fB\-\-btmp\-file \fIpath\fP
Alternate path for btmp.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help information and exit.
.TP
\fB\-V\fR, \fB\-\-version\fR
Display version information and exit.

.SH NOTES
The default UID tresholds are read from /etc/login.defs.

.SH EXIT STATUS
.TP
0
if OK,
.TP
1
if incorrect arguments specified,
.TP
2
if a serious error occurs (e.g. a corrupt log).
.SH SEE ALSO
\fBgroup\fP(5), \fBpasswd\fP(5), \fBshadow\fP(5), \fButmp\fP(5)
.SH HISTORY
The \fBlslogins\fP utility is inspired by the \fBlogins\fP utility, which first appeared in FreeBSD 4.10.
.SH AUTHORS
.MT ooprala@redhat.com
Ondrej Oprala
.ME
.br
.MT kzak@redhat.com
Karel Zak
.ME

.SH AVAILABILITY
The lslogins command is part of the util-linux package and is available from
.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
Linux Kernel Archive
.UE .