Print this page
4107 Add passwd option to read passwords from stdin

@@ -1,12 +1,13 @@
 '\" te
 .\" Copyright 1989 AT&T
 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 2015 Nexenta Systems, 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 PASSWD 1 "May 31, 2013"
+.TH PASSWD 1 "Jun 18, 2015"
 .SH NAME
 passwd \- change login password and password attributes
 .SH SYNOPSIS
 .LP
 .nf

@@ -78,12 +79,16 @@
 .nf
 \fBpasswd\fR \fB-r\fR nisplus [\fB-l\fR | \fB-u\fR | \fB-N\fR] [\fB-f\fR] [\fB-n\fR \fImin\fR] [\fB-w\fR \fIwarn\fR]
      [\fB-x\fR \fImax\fR] [\fB-D\fR \fIdomainname\fR] \fIname\fR
 .fi
 
+.LP
+.nf
+\fBpasswd\fR \fB-S\fR [\fIname\fR]
+.fi
+
 .SH DESCRIPTION
-.sp
 .LP
 The \fBpasswd\fR command changes the password or lists password attributes
 associated with the user's login \fIname\fR. Additionally, privileged users can
 use \fBpasswd\fR to install or change passwords and attributes associated with
 any login \fIname\fR.

@@ -365,11 +370,10 @@
 The number of days relative to \fImax\fR before the password expires and the
 \fIname\fR are warned.
 .RE
 
 .SS "Security"
-.sp
 .LP
 \fBpasswd\fR uses \fBpam\fR(3PAM) for password change. It calls PAM with a
 service name \fBpasswd\fR and uses service module type \fBauth\fR for
 authentication and password for password change.
 .sp

@@ -377,11 +381,10 @@
 Locking an account (\fB-l\fR option) does not allow its use for password based
 login or delayed execution (such as \fBat\fR(1), \fBbatch\fR(1), or
 \fBcron\fR(1M)). The \fB-N\fR option can be used to disallow password based
 login, while continuing to allow delayed execution.
 .SH OPTIONS
-.sp
 .LP
 The following options are supported:
 .sp
 .ne 2
 .na

@@ -517,11 +520,10 @@
 .RE
 
 .RE
 
 .SS "Privileged User Options"
-.sp
 .LP
 Only a privileged user can use the following options:
 .sp
 .ne 2
 .na

@@ -610,12 +612,20 @@
 Sets maximum field for \fIname\fR. The \fImax\fR field contains the number of
 days that the password is valid for \fIname\fR. The aging for \fIname\fR is
 turned off immediately if \fImax\fR is set to \fB\(mi1\fR\&.
 .RE
 
-.SH OPERANDS
 .sp
+.ne 2
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 11n
+Read the password from standard input (pipe).
+.RE
+
+.SH OPERANDS
 .LP
 The following operand is supported:
 .sp
 .ne 2
 .na

@@ -624,11 +634,10 @@
 .RS 8n
 User login name.
 .RE
 
 .SH ENVIRONMENT VARIABLES
-.sp
 .LP
 If any of the \fBLC_*\fR variables, that is, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
 \fBLC_TIME\fR, \fBLC_COLLATE\fR, \fBLC_NUMERIC\fR, and \fBLC_MONETARY\fR (see
 \fBenviron\fR(5)), are not set in the environment, the operational behavior of
 \fBpasswd\fR for each corresponding locale category is determined by the value

@@ -662,11 +671,10 @@
 negative responses. In the \fBC\fR locale, the messages are presented in the
 default form found in the program itself (in most cases, U.S. English).
 .RE
 
 .SH EXIT STATUS
-.sp
 .LP
 The \fBpasswd\fR command exits with one of the following values:
 .sp
 .ne 2
 .na

@@ -765,11 +773,10 @@
 .RS 6n
 Account expired.
 .RE
 
 .SH FILES
-.sp
 .ne 2
 .na
 \fB\fB/etc/default/passwd\fR\fR
 .ad
 .RS 23n

@@ -1000,11 +1007,10 @@
 .RS 23n
 Shell database.
 .RE
 
 .SH ATTRIBUTES
-.sp
 .LP
 See \fBattributes\fR(5) for descriptions of the following attributes:
 .sp
 
 .sp

@@ -1021,11 +1027,10 @@
 
 .sp
 .LP
 The human readable output is Uncommitted. The options are Committed.
 .SH SEE ALSO
-.sp
 .LP
 \fBat\fR(1), \fBbatch\fR(1), \fBfinger\fR(1), \fBkpasswd\fR(1), \fBlogin\fR(1),
 \fBnistbladm\fR(1), \fBcron\fR(1M), \fBdomainname\fR(1M), \fBeeprom\fR(1M),
 \fBid\fR(1M), \fBldapclient\fR(1M), \fBmkpwdict\fR(1M), \fBpassmgmt\fR(1M),
 \fBpwconv\fR(1M), \fBsu\fR(1M), \fBuseradd\fR(1M), \fBuserdel\fR(1M),

@@ -1035,18 +1040,16 @@
 \fBpolicy.conf\fR(4), \fBshadow\fR(4), \fBshells\fR(4), \fBattributes\fR(5),
 \fBenviron\fR(5), \fBpam_authtok_check\fR(5), \fBpam_authtok_get\fR(5),
 \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), \fBpam_ldap\fR(5),
 \fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5), \fBpam_unix_session\fR(5)
 .SH NOTES
-.sp
 .LP
 The \fBpam_unix\fR(5) module is no longer supported. Similar functionality is
 provided by \fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5),
 \fBpam_unix_session\fR(5), \fBpam_authtok_check\fR(5),
 \fBpam_authtok_get\fR(5), \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), and
 \fBpam_passwd_auth\fR(5).
-.sp
 .LP
 The \fBnispasswd\fR and \fBypasswd\fR commands are wrappers around
 \fBpasswd\fR. Use of \fBnispasswd\fR and \fBypasswd\fR is discouraged. Use
 \fBpasswd\fR \fB-r\fR \fIrepository_name\fR instead.
 .sp