Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

How to Change a User Password on Ubuntu: Desktop, Terminal, Admin, and Recovery Methods

A practical Ubuntu guide covering desktop and terminal password changes, administrator resets, authd recovery, policy errors, expiry, locking, and safe account management.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To change your own Ubuntu password, open Activities → Settings → System → Users, select the password control, enter the current password, enter the new password twice, and choose Change. In a terminal, run passwd. To change another local account, an administrator can unlock the Users panel or run sudo passwd username. If you forgot the old password, use an administrator reset; on systems using authd, Ubuntu also provides an online-authentication recovery path through GDM or SSH.

Choose the right Ubuntu password method

The correct procedure depends on whose password is changing, whether the existing password is known, and whether the account is local or managed through authd. Use this matrix before entering a command:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Situation Best route Access required What it changes
You know your own current password and use the desktop Settings → System → Users An active graphical session Your local login password
You know your own current password but have no desktop passwd Terminal access to your account Your local login password
You administer another local account Users panel or sudo passwd username Administrator or superuser rights The selected account’s local password
You forgot a local password and have administrator access sudo passwd username A different administrator account or root access A replacement password without the old-password prompt
You forgot a local password on an authd system GDM or SSH authentication-method recovery Completion of the configured online authentication flow A new local password after identity verification
You need expiry, lock, or unlock administration Password-management options for passwd Administrator rights for another account Password aging or account-password state

A normal account is allowed to change only its own password. Administrative commands affect another account and should be used only when you are authorized to manage that system.

How to change your own password in Ubuntu Settings

This is the simplest route on an Ubuntu desktop when you know the current password.

#1 Best Overall
Panasonic Toughbook CF-31 MK5 Rugged Laptop, 13.1in i5, 8GB 256GB (Renewed) | Touch, 4G LTE, Backlit Keyboard, Linux Ubuntu OS
  • [ULTRA-RUGGED DESIGN] MIL-STD-810G and IP65 certified. Built to survive 6-foot drops, heavy rain, and extreme vibrations. Features a magnesium alloy chassis with an integrated carry handle for maximum portability
  • [4G LTE - WORK ANYWHERE] Integrated 4G LTE Multi-Carrier Mobile Broadband. Stay connected to the internet in remote areas or on the road without relying on Wi-Fi or phone hotspots. True mobile freedom for field professionals
  • [1200-NIT SUNLIGHT READABLE] 13.1" XGA Touchscreen with CircuLumin technology. At 1200 nits, it is nearly 4x brighter than a standard laptop, ensuring perfect visibility under direct, intense sunlight
  • [LINUX UBUNTU PRE-INSTALLED] Fast, secure, and bloatware-free. Optimized for developers, network engineers, and diagnostic software that thrives in a stable, open-source environment
  • [LEGACY SERIAL PORT] Features a native RS-232 Serial Port, HDMI, and USB 3.0. Essential for connecting directly to industrial machinery, CNCs, and automotive diagnostic tools without unreliable adapter
  1. Open Activities and search for Settings.
  2. Open Settings, then choose System.
  3. Select Users.
  4. Select your account and activate the password control.
  5. Enter the current password when prompted.
  6. Enter the new password, then enter it again in the confirmation field.
  7. Choose Change to apply it.

The password check is performed by Ubuntu’s account and authentication stack, so a new value can be refused when it conflicts with the machine’s configured password policy. There is no universal minimum length that applies to every installation; policy can be site-specific.

What happens to the login keyring

Ubuntu’s desktop help states that updating the login password automatically updates the login keyring password to the same new value. That keeps the keyring aligned with the desktop login in the normal graphical change flow. If an installation uses a different keyring setup or the keyring was already out of sync, its unlock behavior can differ from this default.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to change another user’s password in the graphical interface

An administrator can manage a second local account from the same Users panel. The panel is normally protected so that an ordinary session cannot silently alter other accounts.

  1. Open Activities → Settings → System → Users.
  2. Activate the panel’s unlock control.
  3. Authenticate with an administrator password when Ubuntu asks for permission.
  4. Under Other Users, select the account you need to manage.
  5. Choose that account’s password control.
  6. Enter a replacement password twice and select Change.

The administrator is changing the selected local account, not the administrator session that opened Settings. Verify the account name before confirming, especially on a shared computer where several names may look similar.

If the account is not listed under Other Users, it may be a remote identity, a service account without a desktop profile, or an account outside the graphical panel’s scope. Use the terminal method only after identifying the account correctly.

How to change your password with the passwd command

The terminal utility for a logged-in user is simply:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
passwd

Run it in a terminal under the account whose password you want to change. When an existing password is present, passwd asks for that old password first. It then asks for the new password twice and applies the system’s password-policy checks.

Rank #2
Lenovo IdeaPad Slim 3 Linux Laptop, 15.6" FHD Touchscreen Laptop, 8-Core AMD Ryzen 7 5825U, 16GB RAM, 512GB SSD, Keypad, SD Card Reader, Stylus Pen + External Portable SSD + USB Hub, Linux Ubuntu OS
  • Powerful Linux Laptop: This IdeaPad Slim 3 Laptop comes pre-installed with Ubuntu Linux, offering fast performance, robust security, and a clean, user-friendly experience. Enjoy full customization, seamless hardware compatibility, and access to thousands of open-source apps. Whether you're working, creating, or coding, it's built to keep up with everything you do.
  • A Multitasking Master: The latest AMD Ryzen 7 5825U processor (up to 4.5 GHz) delivers powerful performance with 8 cores and 16 threads for smooth multitasking. Integrated AMD Radeon Graphics provide crisp visuals for streaming, browsing, photo editing, and casual gaming. With smart machine intelligence, it adapts to your needs for a fast, responsive experience.
  • 15.6" Full HD Display: The IdeaPad Slim 3 boasts an 88% screen-to-body ratio for a floating, edge-to-edge visual experience. TÜV Low Blue Light certification reduces eye strain, making it perfect for long work or study sessions.
  • Military-Grade Durability: The smart IdeaPad Slim 3 combines portability and durability, letting you work, study, and play on the go. With a profile 10% slimmer than the previous generation, it's lightweight yet military-grade rugged, ready for anything, anywhere.
  • Versatile Connectivity: Enjoy the security of a built-in webcam with a privacy shutter. Connect effortlessly with multiple ports: 2x USB A, 1x USB C, 1x HDMI, 1x SD Card Reader, 1x Headphone/Microphone combo. Bundle comes with Stylus Pen, 256GB Portable SSD and 5-in-1 Docking Station.
  1. Open a terminal in your Ubuntu session or connect through an approved shell.
  2. Run passwd with no username.
  3. Supply the current password when requested.
  4. Type the new password, submit it, and type it again for confirmation.
  5. Wait for the command to report whether the change succeeded or identify the policy or permission problem that prevented it.

Using no username is deliberate: it targets the account represented by the current session. Do not append another person’s name unless you intend to perform an administrative change and have the required privilege.

Password prompts and visible input

Terminal password prompts commonly provide no visible character feedback while you type. The cursor may appear not to move, but the terminal can still be accepting input. Type the requested value and press Enter; do not add spaces or paste a value you cannot verify.

How an administrator changes another account from a terminal

The administrative form is:

sudo passwd username

Replace username with the target account’s actual login name. sudo first authenticates the person requesting elevation, then runs passwd with administrative authority. Because the administrator is resetting the account, the target user’s old password is not required.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Confirm the exact login name. A display name is not always the same as the Unix username.
  2. Run sudo passwd username.
  3. Enter your own administrator password when sudo requests it.
  4. Enter the new password for the target account twice when passwd asks.
  5. Give the new credential to the user through a secure channel and ask them to replace it if your policy requires a one-time administrative password.

The command still subjects the new value to the machine’s configured password rules. Administrative privilege bypasses the old-password check; it does not guarantee that every proposed new value will be accepted.

What to do if you forgot your old Ubuntu password

If another administrator account is available

Sign in with the other administrator account and run sudo passwd username, substituting the locked-out account’s login name. This is the normal local-account reset because it does not depend on the forgotten credential. After the reset, sign in with the replacement password and review any applications or services that were using the old credential.

If the computer uses authd

Ubuntu’s authd workflow provides a separate recovery path for a forgotten local password. Start a login through GDM (the graphical login manager) or SSH. At the authentication-method selection, return to that selection screen, complete the available online authentication flow, and enter a new local password when Ubuntu prompts for one. This procedure applies to systems configured with authd; it is not a substitute for an administrator reset on an ordinary standalone local-account installation.

If neither an administrator nor the configured online method is available

The supported routes above require either administrative authority or a successful identity-provider flow. Do not try to repair the account by editing password database files directly. Arrange authorized console or administrator access, or follow the recovery process established by the system owner.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
64GB - 16-in-1, Bootable USB Drive 3.2 for Linux & Windows 11, Zorin | Mint | Kali | Ubuntu | Tails | Debian, Supported UEFI and Legacy
  • ✅For beginners, refer image-7, its a video boot instruction, and image-6 is "boot menu Hot Key list"
  • ✅16-IN-1, 64GB Bootable USB Drive 3.2 , Can Run Linux On USB Drive Without Install, All Latest versions.
  • ✅Including Windows 11 64Bit & Linux Mint 22.3 (Cinnamon)、Kali 2026.02、Ubuntu 26.04、Zorin Pro 18、Tails 7.8.1、Debian 13.5.0、Garuda 2026.03、Fedora Workstation 44、Manjaro 25.06、Pop!_OS 22.04、Solus 2026.04、Archcraft 26.05、Neon 2026.06、Fossapup 9.5、Sparkylinux 8.3, All ISO has been Tested
  • ✅Supported UEFI and Legacy, Compatibility any PC/Laptop, Any boot issue only needs to disable "Secure Boot"

Why Ubuntu rejects a new password

passwd checks password-aging rules and complexity requirements through the system’s authentication modules. Ubuntu installations commonly use PAM components and a password-quality policy, but the exact rules depend on how the machine was configured.

  • Policy failure: the proposed value may be too short, too predictable, reused, or otherwise disallowed by the local policy. Read the command’s message and choose a value that meets the stated requirement.
  • Confirmation mismatch: the two new entries differ. Re-enter them carefully rather than assuming the first value was stored.
  • Permission failure: changing another account without administrative authority is not permitted. Log in as an administrator or use an authorized sudo configuration.
  • Unknown account: check the login name. The command must target an existing local account when you use the local passwd database.
  • Password aging restriction: an account can have rules that control when a password may be changed or when it expires. An administrator can inspect and adjust those controls with the options below.

Never promise a single minimum length for all Ubuntu computers. A desktop managed by an organization can enforce different requirements from an unmodified installation.

Password expiry and aging controls

Administrators can use passwd options for lifecycle management. These options affect the named account, so include the username and elevate with sudo when managing someone else:

Goal Command Effect
Require a change at the next login sudo passwd -e username Expires the current password so the account must set a new one at its next authentication.
Set maximum password validity sudo passwd -x MAX_DAYS username Sets the maximum number of days the password remains valid.
Set an expiration warning period sudo passwd -w WARN_DAYS username Sets how many days before expiry the user should receive warnings.

MAX_DAYS and WARN_DAYS are placeholders for numbers. For example, replace MAX_DAYS with the maximum validity your policy specifies; do not type the capitalized token literally.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Locking and unlocking an account password

Locking is different from changing a password. It changes whether password authentication for the account is locked, while the password value remains managed by the account database.

  • Lock the password with sudo passwd -l username.
  • Unlock the password with sudo passwd -u username.

Confirm the username before either operation. Locking the wrong account can interrupt a service or prevent a colleague from signing in; unlocking an account can undo an intentional security control.

Why you should not edit /etc/shadow manually

Ubuntu stores account information across files and authentication configuration, including /etc/passwd, /etc/shadow, and /etc/pam.d/passwd. Those files are implementation details of the account and PAM stack, not a safer shortcut for changing credentials.

Rank #4
Lenovo Business Laptop - Linux Mint (Cinnamon) - Intel i5-1335U, 16GB RAM, 256GB SSD, 15.6" FHD 1920x1080 Display, Full Keyboard, Fast Charging
  • Intel Core i5-1335U Processor (12M Cache, 12 Threads, up to 4.6 GHz) - 256GB Solid State Drive - 16GB DDR4 SDRAM
  • 15.6" FHD (1920x1080) Non-Touch Anti-Glare Display - Intel UHD 620 Integrated Graphics - Stereo Speakers
  • 720p HD Webcam with Privacy Shutter. Integrated Microphone - Intel Dual Band Wireless-AC (2x2) 8265, Bluetooth Version 4.2
  • I/O Ports: 2x USB 3.0, 1x USB 3.1 Type-C 3.1, Headphone/Mic Combo Port, 4-in-1 Card Reader, HDMI, Kensington Mini-Lock Slot
  • Linux Mint (Cinnamon) 64-Bit - Keyboard with Full NumberPad - Fast Charging

Use Settings or passwd instead. The utility invokes the system’s password-management path and applies the configured policy, permissions, aging rules, and related updates. Hand-editing a shadow entry can corrupt formatting, bypass policy, or leave the account in a state that other authentication components do not expect.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting by symptom

The password control is unavailable in Settings

Make sure you selected an account that the desktop can manage and that the Users panel is unlocked. If you are trying to modify another account, authenticate through the unlock control first. An account supplied by a remote identity service may not expose a local password control in this panel.

sudo asks for a password you do not know

sudo requests the password of the administrator who is running the command, not the target user’s old password. If you cannot authenticate as an authorized administrator, stop and obtain that access rather than repeatedly guessing.

The reset works, but the user still cannot sign in

Check that the reset targeted the correct login name and that the account is not locked with passwd -l. Also distinguish a local-account password from an online identity credential: changing one does not necessarily change the other.

A password changes locally but a remote service rejects it

The local passwd command updates the Ubuntu account managed by the local authentication stack. A separate service, directory, or identity provider can have its own credential and policy. Use that provider’s authorized procedure when the account is not local.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You need to verify what operation was performed

Read the command’s completion message and note the exact account name and option used. Keep administrative changes in the system’s normal audit or change-record process, particularly on shared or production machines.

Safe operating checklist

  • Identify whether the target is your own account, another local account, or a remotely managed identity.
  • Use Settings for a desktop change and passwd for a shell-based change.
  • Use sudo passwd username only when you are authorized to administer that account.
  • Check the username before resets, expiry changes, locks, and unlocks.
  • Keep the replacement password private and deliver temporary credentials through an approved secure channel.
  • Expect local password policy and aging rules to reject some values.
  • Do not edit /etc/shadow or other password files by hand.
  • For authd installations, use the documented GDM or SSH online-authentication recovery flow when the local password is forgotten.

For most desktop users, the Settings path is sufficient. For headless systems, scripted administration, expiry enforcement, or a forgotten credential, the appropriate passwd form supplies the necessary control without bypassing Ubuntu’s authentication framework.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.