Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use passwd

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Passwd (option) (parameter)

Options-

-d: delete the password and only the system administrator can use it

-f: enforcement

-k: the setting can only be updated after the password expires.

-l: lock the password

-s: lists the information about the password, which can only be used by the system administrator

-u: unlock the locked account

A tool for automatically generating passwords: mkpasswd

The default command does not exist to install the package

Yum install-y expect

View mkpasswd parameter settings

Command parameters:

-l # (length definition of password, default is 9)

-d # (number of numbers, default is 2)

-c # (number of lowercase characters, default is 2)

-C # (number of uppercase characters, default is 2)

-s # (number of special characters, default is 1)

-v (details.)

-p prog (program sets password, default is passwd)

Example 1: generate a 12-bit password

Mkpasswd-l 12

Example 2: generate a 12-digit password with 5 digits without a string

Mkpasswd-l 12-d 5-s 0

Example 3: how to set a password for a user in a script

Passwd-stdin lizheng

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report