Download Cygwin User's Guide

Transcript
Chapter 3. Using Cygwin
-L, --length LEN
Other options:
-S, --status
-h, --help
-v, --version
set system minimum password length to LEN.
display password status for USER (locked, expired,
etc.) plus global system password settings.
output usage information and exit.
output version information and exit.
If no option is given, change USER’s password. If no user name is given,
operate on current user. System operations must not be mixed with user
operations. Don’t specify a USER when triggering a system operation.
passwd changes passwords for user accounts. A normal user may only change the
password for their own account, but administrators may change passwords on any
account. passwd also changes account information, such as password expiry dates
and intervals.
For password changes, the user is first prompted for their old password, if one is
present. This password is then encrypted and compared against the stored password.
The user has only one chance to enter the correct password. The administrators are
permitted to bypass this step so that forgotten passwords may be changed.
The user is then prompted for a replacement password. passwd will prompt twice
for this replacement and compare the second entry against the first. Both entries are
required to match in order for the password to be changed.
After the password has been entered, password aging information is checked to see
if the user is permitted to change their password at this time. If not, passwd refuses
to change the password and exits.
To get current password status information, use the -S option. Administrators can
use passwd to perform several account maintenance functions (users may perform
some of these functions on their own accounts). Accounts may be locked with the -l
flag and unlocked with the -u flag. Similarly, -c disables a user’s ability to change
passwords, and -C allows a user to change passwords. For password expiry, the -e
option disables expiration, while the -E option causes the password to expire according to the system’s normal aging rules. Use -p to disable the password requirement
for a user, or -P to require a password.
Administrators can also use passwd to change system-wide password expiry and
length requirements with the -i, -n, -x, and -L options. The -i option is used to
disable an account after the password has been expired for a number of days. After
a user account has had an expired password for NUM days, the user may no longer
sign on to the account. The -n option is used to set the minimum number of days before a password may be changed. The user will not be permitted to change the password until MINDAYS days have elapsed. The -x option is used to set the maximum
number of days a password remains valid. After MAXDAYS days, the password is
required to be changed. Allowed values for the above options are 0 to 999. The -L option sets the minimum length of allowed passwords for users who don’t belong to the
administrators group to LEN characters. Allowed values for the minimum password
length are 0 to 14. In any of the above cases, a value of 0 means ‘no restrictions’.
Limitations: Users may not be able to change their password on some systems.
ps
Usage: ps [-aefls] [-u UID]
Report process status
-a,
-e,
-f,
-h,
--all
--everyone
--full
--help
show processes of all users
show processes of all users
show process uids, ppids
output usage information and exit
47