mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
31 lines
617 B
Plaintext
31 lines
617 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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`
|