-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux passwd Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to passwd on Linux, covering Arch Linux, CachyOS, and other distributions including changing passwords, password policies, and user password management.
passwd changes user passwords.
Uses:
- Change password: Update your password
- Set password: Set password for user
- Lock account: Disable account
- Password policies: Enforce policies
Why it matters:
- Security: Strong passwords protect system
- Account management: Control user access
- Compliance: Meet security requirements
Basic usage:
# Change your password
passwd
# Enter current password
# Enter new password
# Confirm new passwordAs root:
# Change user password
sudo passwd username
# Or as root
passwd username
# Enter new passwordCommon requirements:
- Minimum length: Usually 8+ characters
- Complexity: Mix of letters, numbers, symbols
- History: Can't reuse recent passwords
- Expiration: Password expires after time
View password info:
# Check password age
chage -l username
# Or
passwd -S usernameDisable account:
# Lock account
sudo passwd -l username
# Unlock account
sudo passwd -u usernameForce password change:
# Expire password
sudo passwd -e username
# User must change on next loginReset password:
# As root
sudo passwd username
# Or boot from live USB
# Mount system
# chroot
# passwd usernameCheck policies:
# Check PAM config
cat /etc/pam.d/passwd
# Check password requirements
passwd -S usernameThis guide covered passwd usage, password management, and policies for Arch Linux, CachyOS, and other distributions.
- User and Groups - User management
- PAM Guide - Authentication
- Security Configuration - Security
-
passwd Documentation:
man passwd
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.