linux系統管理之批量修改密碼命令chpasswd
前面遇到很多中linux系統管理的方式,今天給大家搜集了關于linux系統管理中使用chpasswd命令的信息。相信它會給大家的帶來高效率的工作,希望大家看后會有很大收獲。
命令:chpasswd
NAME
chpasswd - update password file in batch
SYNOPSIS
chpasswd [-e]
DESCRIPTION
chpasswd reads a file of user name and password pairs from standard input and uses this information to update a group of existing users. Without the -e switch, the passwords are expected to be cleartext. With the -e switch, the passwords are expected to be in encrypted form. Each line is of the format
user_name:password
The named user must exist. The supplied password will be encrypted as necessary, and the password age updated, if
present.
This command is intended to be used in a large system environment where many accounts are created at a single time.
CAVEATS
The input file must be protected if it contains unencrypted passwords.
執行方法:
先創建用戶密碼對應文件,格式為username:password,如abc:abc123,保存成文本文件ab.txt.執行命令:chpasswd
以上是運用chpasswd命令來批量修改密碼。是linux系統管理中的捷徑。
【編輯推薦】