If you read about Linux frequently, you will know that Linux is becoming more and more popular. If you become an application of Linux, you will understand some Linux commands. This document describes the password command in Linux, which plays a certain role in the password command in Linux.
Passwd:
1. Role
The passwd command is used to change the logon password of an account. The permission is granted to all users.
2. Format
Passwd [Option] account name
3. Main Parameters
-L: the name of the named account is locked and can only be used by users with super user permissions.
-U: Unlock the account lock status. Only users with Super User Permissions can use it.
-X, -- maximum = DAYS: the maximum password used for DAYS), only users with Super User Permissions Can use.
-N, -- minimum = DAYS: The minimum password used for DAYS). Only users with Super User Permissions can use the password.
-D: Delete the user's password. Only users with Super User Permissions can use it.
-S: Check the password authentication type of a specified user. Only users with Super User Permissions can use the password.
Test example:
- [Root @ localhost ~] # Passwd-l saga
- Locking password for user saga.
- Passwd: Success (locking)
- [Root @ localhost ~] # Passwd-u saga
- Unlocking password for user saga.
- Passwd: Success. Unlock)
- [Root @ localhost ~] # Passwd-d saga
- Removing password for user saga.
- Passwd: Success Delete password)
- [Root @ localhost ~] # Passwd-S saga view authentication types)
- Saga NP 2006-11-09 0 99999 7-1 (Empty password .)
- [Root @ localhost ~] # Passwd saga password change)
- Changing password for user saga.
- New UNIX password:
- Bad password: it is too simplistic/systematic
- Retype new UNIX password:
- Passwd: all authentication tokens updated successfully.
- [Root @ localhost ~] # Passwd-x 200-n 50 saga Add the maximum password length and the minimum number of days of use)
- Adjusting aging data for user saga.
- Passwd: Success
The above is an introduction to the password command in Linux.
- Linux virtualization technology Xen virtualization beginner's Guide
- Handling Linux kernel security details
- Basic Shell programming syntax in Linux
- How to program and run a Shell program in Linux
- Linux Shell programming bash Internal commands