passwd

>Usage

The passwd command is used to change or update a user's password on a system. It allows both administrators and users to manage password security by enforcing policies such as password complexity, expiration, and change requirements.

This command is essential for maintaining system security by controlling user authentication. Additionally, it allows administrators to lock or unlock user accounts and force users to change their passwords after a set period or event.

>Synopsis

passwd [option] [username]

>Options

-d

Deletes the user's password, leaving the account without a password. This is useful for setting up password-less accounts.

Example:

Dots

-zsh

> passwd -d <username>


Password for user <username> deleted.

-e

Forces the user to change their password the next time they log in, often used to enforce periodic password changes.

-l

Locks the user's account by disabling their password, which prevents login but preserves the account.

-u

Unlocks the user's account, enabling them to log in again after it has been locked.

>Quiz

Progress: Question ? out of ?

Question Title

Page written by Alessia Sanchez