Windows net user username /passwordreq equivalent in Linux
Sets or changes a user account password.
net user username /passwordreq
passwd
passwd
passwd
Overview
What this command does
On Windows, "net user username /passwordreq" is used to change user passwords. On Linux, the closest practical mapping shown here is "passwd". Sets or changes a user account password. This reference is grouped under Security & Permissions → Users & Groups.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows net user username /passwordreq maps to passwd for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux permissions for Windows users.
Practical tasks
Common use cases
Change user passwords
Sets or changes a user account password.
passwd
Change your own password
sudo passwd john
Change another user's password
passwd -l john
Lock an account (disable login)
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
passwd
sudo passwd john
sudo passwd -l john
sudo passwd -u john
Walkthrough
Examples with explanations
# Windows: net user john * (prompts for new password)
passwd # change your own password
sudo passwd john # admin: change john's password
sudo passwd -l john # lock account (can't log in)
sudo passwd -u john # unlock account
Reference
Common options and variations
| Command or option | Use |
|---|---|
passwd | Change your own password |
sudo passwd john | Change another user's password |
passwd -l john | Lock an account (disable login) |
passwd -u john | Unlock an account |
passwd -e john | Force password change on next login |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "passwd" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | passwd |
Same command on this distribution. |
| Fedora | same command | passwd |
Same command on this distribution. |
| Arch | same command | passwd |
Same command on this distribution. |
Keep learning