Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux passwd command

Linux passwd command

Linux Command Reference Linux Command Reference

The Linux passwd command is used to change a user's password

Syntax

passwd [-k] [-l] [-u [-f]] [-d] [-S] [username]

Required Parameters:

Select parameters:

Example

Change a user's password



# passwd runoob  //set the password for the runoob user

Enter new UNIX password:  //输入新密码,输入的密码无回显

Retype new UNIX password:  //确认密码

passwd: password updated successfully

# 

Display account password information



# passwd -S runoob

runoob P 05/13/2010 0 99999 7 -1

Delete a user's password



# passwd -d lx138 

passwd: password expiry information changed.

Linux Command Reference Linux Command Reference