/
githubmirror
/
passwd
Обзор
Документация
Войти
/
githubmirror
/
passwd
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
usermode
passwd.1
217 строк
8 KB
jnovy
- Commit some earlier work
15 ноя 2004, 14:31
15 ноя 2004, 14:31
b91b2c4
Код
Авторство
О чём код?
.\" Copyright Red Hat, Inc., 1998, 1999, 2002. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, and the entire permission notice in its entirety, .\" including the disclaimer of warranties. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. The name of the author may not be used to endorse or promote .\" products derived from this software without specific prior .\" written permission. .\" .\" ALTERNATIVELY, this product may be distributed under the terms of .\" the GNU Public License, in which case the provisions of the GPL are .\" required INSTEAD OF the above restrictions. (This clause is .\" necessary due to a potential bad interaction between the GPL and .\" the restrictions contained in a BSD-style copyright.) .\" .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED .\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" Copyright (c) Cristian Gafton, 1998, <gafton@redhat.com> .\" .TH PASSWD 1 "Aug 23 2004" "Red Hat Linux" "User utilities" .SH NAME passwd \- update a user's authentication tokens(s) .SH SYNOPSIS .B passwd [-k] [-l] [-u [-f]] [-d] [-n mindays] [-x maxdays] [-w warndays] [-i inactivedays] [-S] [--stdin] [username] .sp 2 .SH DESCRIPTION Passwd is used to update a user's authentication token(s). Passwd is configured to work through the .BR "Linux-PAM API" ". " Essentially, it initializes itself as a "passwd" service with .I Linux-PAM and utilizes configured .I "password" modules to authenticate and then update a user's password. .sp A simple entry in the .I Linux-PAM configuration file for this service would be: .br .br # .br # passwd service entry that does strength checking of .br # a proposed password before updating it. .br # .br passwd password requisite \\ .br /usr/lib/security/pam_cracklib.so retry=3 .br passwd password required \\ .br /usr/lib/security/pam_unix.so use_authtok .br # .sp Note, other module-types are not required for this application to function correctly. .SH OPTIONS .IP \fB-k\fR The option, .BR -k ", " is used to indicate that the update should only be for expired authentication tokens (passwords); the user wishes to keep their non-expired tokens as before. .IP \fB-l\fR This option is used to lock the specified account and it is available to root only. The locking is performed by rendering the encrypted password into an invalid string (by prefixing the encrypted string with an !). .IP \fB--stdin\fR This option is used to indicate that \fBpasswd\fR should read the new password from standard input, which can be a pipe. .IP \fB-u\fR This is the reverse of the -l option - it will unlock the account password by removing the ! prefix. This option is available to root only. By default passwd will refuse to create a passwordless account (it will not unlock an account that has only "!" as a password). The force option \fB-f\fR will override this protection. .IP \fB-d\fR This is a quick way to disable a password for an account. It will set the named account passwordless. Available to root only. .IP \fB-n\fR This will set the minimum password lifetime, in days, if the user's account supports password lifetimes. Available to root only. .IP \fB-x\fR This will set the maximum password lifetime, in days, if the user's account supports password lifetimes. Available to root only. .IP \fB-w\fR This will set the number of days in advance the user will begin receiving warnings that her password will expire, if the user's account supports password lifetimes. Available to root only. .IP \fB-i\fR This will set the number of days which will pass before an expired password for this account will be taken to mean that the account is inactive and should be disabled, if the user's account supports password lifetimes. Available to root only. .IP \fB-S\fR This will output a short information about the status of the password for a given account. Available to root user only. .SH "Remember the following two principles" .IP \fBProtect\ your\ password.\fR Don't write down your password - memorize it. In particular, don't write it down and leave it anywhere, and don't place it in an unencrypted file! Use unrelated passwords for systems controlled by different organizations. Don't give or share your password, in particular to someone claiming to be from computer support or a vendor. Don't let anyone watch you enter your password. Don't enter your password to a computer you don't trust or if things \"look funny\"; someone may be trying to hijack your password. Use the password for a limited time and change it periodically. .IP \fBChoose\ a\ hard-to-guess\ password.\fR .I passwd will try to prevent you from choosing a really bad password, but it isn't foolproof; create your password wisely. Don't use something you'd find in a dictionary (in any language or jargon). Don't use a name (including that of a spouse, parent, child, pet, fantasy character, famous person, and location) or any variation of your personal or account name. Don't use accessible information about you (such as your phone number, license plate, or social security number) or your environment. Don't use a birthday or a simple pattern (such as \"qwerty\", \"abc\", or \"aaa\"). Don't use any of those backwards, followed by a digit, or preceded by a digit. Instead, use a mixture of upper and lower case letters, as well as digits or punctuation. When choosing a new password, make sure it's unrelated to any previous password. Use long passwords (say 8 characters long). You might use a word pair with punctuation inserted, a passphrase (an understandable sequence of words), or the first letter of each word in a passphrase. .SH "" These principles are partially enforced by the system, but only partly so. Vigilence on your part will make the system much more secure. .SH "EXIT CODE" On successful completion of its task, .B passwd will complete with exit code 0. An exit code of 1 indicates an error occurred. Textual errors are written to the standard error stream. .SH "CONFORMING TO" .br .BR Linux-PAM (Pluggable Authentication modules for Linux). .br Note, if your distribution of Linux-PAM conforms to the Linux Filesystem Standard, you may find the modules in .I /lib/security/ instead of /usr/lib/security/, as indicated in the example. .SH "FILES" .br .B /etc/pam.d/passwd - the .BR Linux-PAM configuration file .SH BUGS .sp 2 None known. .SH "SEE ALSO" .BR pam "(8), " and .BR pam_chauthok "(2). " .sp For more complete information on how to configure this application with .BR Linux-PAM ", " see the .BR "Linux-PAM System Administrators' Guide" " at " .br .I "<http://parc.power.net/morgan/Linux-PAM/index.html>" .SH AUTHOR Cristian Gafton <gafton@redhat.com>