Introduction to the password command in Linux

Source: Internet
Author: User

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:

 
 
  1. [Root @ localhost ~] # Passwd-l saga
  2. Locking password for user saga.
  3. Passwd: Success (locking)
  4. [Root @ localhost ~] # Passwd-u saga
  5. Unlocking password for user saga.
  6. Passwd: Success. Unlock)
  7. [Root @ localhost ~] # Passwd-d saga
  8. Removing password for user saga.
  9. Passwd: Success Delete password)
  10. [Root @ localhost ~] # Passwd-S saga view authentication types)
  11. Saga NP 2006-11-09 0 99999 7-1 (Empty password .)
  12. [Root @ localhost ~] # Passwd saga password change)
  13. Changing password for user saga.
  14. New UNIX password:
  15. Bad password: it is too simplistic/systematic
  16. Retype new UNIX password:
  17. Passwd: all authentication tokens updated successfully.
  18. [Root @ localhost ~] # Passwd-x 200-n 50 saga Add the maximum password length and the minimum number of days of use)
  19. Adjusting aging data for user saga.
  20. Passwd: Success

The above is an introduction to the password command in Linux.

  1. Linux virtualization technology Xen virtualization beginner's Guide
  2. Handling Linux kernel security details
  3. Basic Shell programming syntax in Linux
  4. How to program and run a Shell program in Linux
  5. Linux Shell programming bash Internal commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.