前面遇到很多中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系統管理中的捷徑。
- linux磁碟命令管理優勢特點之:df命令全面解析
- linux磁碟管理命令之dd命令講解
- linux磁碟管理命令之:du命令詳解
- 為加快速度關閉Linux下不必要的系統服務
- linux磁碟命令中df命令的作用