HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

passwd — Change a user's password. See also: `chpasswd`. More information: <https://manned.org/passwd>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandpasswordclichangeuserpasswdseealso

Problem

How to use the passwd command: Change a user's password. See also: chpasswd. More information: <https://manned.org/passwd>.

Solution

passwd — Change a user's password. See also: chpasswd. More information: <https://manned.org/passwd>.

Change the password of the current user interactively:
passwd


Change the password of a specific user:
sudo passwd {{username}}


Get the current status of the user:
passwd {{[-S|--status]}}


Make the password of the account blank (it will set the named account passwordless):
passwd {{[-d|--delete]}}


Set password programmatically (ideal for install scripts):
yes {{password}} | passwd

Code Snippets

Change the password of the current user interactively

passwd

Change the password of a specific user

sudo passwd {{username}}

Get the current status of the user

passwd {{[-S|--status]}}

Make the password of the account blank (it will set the named account passwordless)

passwd {{[-d|--delete]}}

Set password programmatically (ideal for install scripts)

yes {{password}} | passwd

Context

tldr-pages: common/passwd

Revisions (0)

No revisions yet.