view usr/src/man/man1m/logins.1m @ 13659:57451298f940

1469 ttyc/ttyd should be an allowed console device Reviewed by: Milan Jurik <milan.jurik@xylab.cz> Reviewed by: Alexander Eremin <alexander.r.eremin@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Gary Mills <gary_mills@fastmail.fm>
date Thu, 05 Apr 2012 08:47:21 -0500
parents 5b2854ecc12d
children
line wrap: on
line source

'\" te
.\"  Copyright 1989 AT&T Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH LOGINS 1M "Sep 6, 2005"
.SH NAME
logins \- list user and system login information
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/logins\fR [\fB-admopstux\fR] [\fB-g\fR \fIgroup...\fR]
     [\fB-l\fR \fIlogin_name...\fR]
.fi

.SH DESCRIPTION
.sp
.LP
This command displays information on user and system logins known to the
system. Contents of the output is controlled by the command options and can
include the following: user or system login, user id number, \fBpasswd\fR
account field value (user name or other information), primary group name,
primary group id, multiple group names, multiple group ids, home directory,
login shell, and four password aging parameters. The default information is the
following: login id, user id, primary group name, primary group id and the
account field value. Output is sorted by user id, system logins, followed by
user logins.
.SH OPTIONS
.sp
.LP
Options may be used together. If so, any login that matches any criteria are
displayed.
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 20n
Add two password expiration fields to the display. The fields show how many
days a password can remain unused before it automatically becomes inactive, and
the date that the password expires.
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.RS 20n
Selects logins with duplicate uids.
.RE

.sp
.ne 2
.na
\fB\fB\fR\fB-g\fR \fIgroup\fR\fR
.ad
.RS 20n
Selects all users belonging to \fBgroup\fR, sorted by login. Multiple groups
can be specified as a comma-separated list. When the \fB-l\fR and \fB-g\fR
options are combined, a user is only listed once, even if the user belongs to
more than one of the selected groups.
.RE

.sp
.ne 2
.na
\fB\fB\fR\fB-l\fR \fIlogin_name...\fR\fR
.ad
.RS 20n
Selects the requested login. Multiple logins can be specified as a
comma-separated list. Depending on the nameservice lookup types set in
\fB/etc/nsswitch.conf\fR, the information can come from the \fB/etc/passwd\fR
and \fB/etc/shadow\fR files and other nameservices. When the \fB-l\fR and
\fB-g\fR options are combined, a user is only listed once, even if the user
belongs to more than one of the selected groups.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.RS 20n
Displays multiple group membership information.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 20n
Formats output into one line of colon-separated fields.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 20n
Selects logins with no passwords.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 20n
Selects all system logins.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 20n
Sorts output by login instead of by uid.
.RE

.sp
.ne 2
.na
\fB\fB-u\fR\fR
.ad
.RS 20n
Selects all user logins.
.RE

.sp
.ne 2
.na
\fB\fB-x\fR\fR
.ad
.RS 20n
Prints an extended set of information about each selected user. The extended
information includes home directory, login shell and password aging
information, each displayed on a separate line. The password information
currently consists of password status:
.sp
.ne 2
.na
\fB\fBNP\fR\fR
.ad
.RS 6n
Account has no password
.RE

.sp
.ne 2
.na
\fB\fBLK\fR\fR
.ad
.RS 6n
Account is locked for \fBUNIX\fR authentication
.RE

.sp
.ne 2
.na
\fB\fBNL\fR\fR
.ad
.RS 6n
Account is a no login account
.RE

.sp
.ne 2
.na
\fB\fBPS\fR\fR
.ad
.RS 6n
Account probably has a valid password
.RE

.sp
.ne 2
.na
\fB\fBUN\fR\fR
.ad
.RS 6n
Account password status is unknown. That is, it is not a recognizable hashed
password or any of the above entries. See \fBcrypt\fR(3C) for valid password
hashes.
.RE

If the login is passworded, status is followed by the date the password was
last changed, the number of days required between changes, and the number of
days allowed before a change is required. The password aging information shows
the time interval that the user receives a password expiration warning message
(when logging on) before the password expires.
.RE

.SH SEE ALSO
.sp
.LP
\fBpasswd\fR(1), \fBcrypt\fR(3C), \fBattributes\fR(5)