Home
» LINUX
»
How to Reset a Forgotten Root Password on Harmonica OS (HamoniKR)
How to Reset a Forgotten Root Password on Harmonica OS (HamoniKR)
The official project name is HamoniKR OS. If you searched for “Harmonica OS,” this guide uses the official HamoniKR spelling from the project documentation. The practical distinction that matters most is this: on an Ubuntu-family desktop such as HamoniKR, you normally sign in with a regular administrator account and use sudo for privileged tasks. Ubuntu disables direct root login by default, so a “forgotten root password” is often really a forgotten password for the administrator account created during installation.
HamoniKR’s current documentation describes the OS as Ubuntu-family software and shows the installer creating a username and password for the user account. Its command examples also use sudo. Ubuntu’s own documentation states that the root account is disabled by default and that administrative commands are normally run with sudo. That is why the safest recovery procedure is usually to reset your normal administrator password, not to create a new root password.
Quick reference
Situation
What to do
You forgot your normal HamoniKR login password
Boot into GRUB recovery mode, open a root shell, remount / read-write, then run passwd your_username.
You truly enabled a separate root password and forgot it
Use the same recovery shell, but run passwd root. Do this only if you intentionally use direct root authentication.
The root filesystem is read-only
Run mount -o remount,rw / before passwd.
The disk is encrypted and asks for an encryption passphrase or recovery key
You must unlock the encrypted disk first. Resetting an account password does not recover a lost disk-encryption key.
You cannot reach the GRUB or recovery menu
Check firmware boot behavior and try showing GRUB with Shift or Esc; if recovery entries are unavailable, use a trusted HamoniKR/Ubuntu live USB as a separate repair path.
Before you reset anything
Use this procedure only on a computer you own or are authorized to administer.
If possible, disconnect unnecessary external drives so you do not confuse the installed system with another disk.
Know the username you want to repair. If you are unsure, the recovery shell can list home directories with ls /home.
If full-disk encryption is enabled, have the disk passphrase or recovery key available. The password reset procedure cannot bypass disk encryption.
Do not choose an installer option that erases the disk. HamoniKR’s installation documentation explicitly warns that its automatic installation mode can erase disk contents.
Step 1: Open the GRUB boot menu
Restart the computer. If the GRUB menu does not appear automatically, try holding Shift on legacy BIOS systems or tapping Esc immediately after the firmware logo on many UEFI systems. Firmware behavior varies, so the exact key timing is system-dependent.
In GRUB, select the entry labeled similar to Advanced options for HamoniKR OS. The wording may include the installed distribution or kernel name rather than exactly matching the illustration below. Then choose a kernel entry that ends in (recovery mode).
In GRUB, open the advanced options for the installed HamoniKR system so you can select a recovery-mode kernel entry.
HamoniKR’s official installation guide confirms that the distribution uses a GRUB boot menu. For the project’s current installation documentation, see HamoniKR 8.0 installation guidance.
Step 2: Drop to a root recovery shell
After the recovery environment loads, choose the option similar to root — Drop to root shell prompt. Recovery-menu wording can vary by Ubuntu-family release and installed recovery packages.
The recovery root filesystem is commonly mounted read-only. Before changing a password, remount it read-write:
mount -o remount,rw /
You can verify the mount state with:
mount | grep ' on / '
The recovery shell must have the root filesystem mounted read-write before the password database can be updated.
Step 3: Identify the account you actually need to reset
If you know the login name, skip to the next step. If you only remember the display name shown on the desktop, list the home directories:
ls /home
For example, if the output includes john, that is a likely local username. You can confirm it with:
id john
If the account exists, id prints its UID and group memberships. Avoid guessing at system-service accounts. The account you want is normally the human user created during installation.
Step 4: Set a new password
Reset the normal administrator account with:
passwd john
Replace john with the real username. Type the new password when prompted, then type it again. Linux does not display password characters while you type. A successful change ends with a message similar to password updated successfully.
Run passwd followed by the affected username; a success message confirms that the password database was updated.
The Ubuntu passwd manual documents the password-changing command and account locking behavior.
If you really mean the root account
Ubuntu documentation says the root account is disabled by default, and HamoniKR follows the Ubuntu family’s sudo-based administrative model. If you previously and deliberately enabled direct root authentication and now need to replace that root password, the recovery-shell command is:
passwd root
However, do not enable a root password merely because you forgot your normal desktop password. Resetting the normal administrator account is the better fit for the default security model. Ubuntu explains this design in its Linux command-line tutorial, including why sudo is preferred over long-lived root sessions.
Step 5: Reboot and verify the new password
Flush pending writes, then reboot:
sync
reboot
If reboot does not return cleanly from the recovery environment, type exit to go back to the recovery menu and choose the normal resume or reboot option.
At the graphical login screen, select the repaired account and enter the new password. Once you are logged in, test administrative access with a harmless command:
sudo -v
When prompted, enter the same new user password. If the command returns without an error, your login password and sudo authentication are working.
After rebooting, sign in with the repaired user account and the new password, then verify that sudo accepts it.
Troubleshooting common failures
“Authentication token manipulation error”
This usually means the system could not update the password files. In recovery mode, first make sure / is writable:
mount -o remount,rw /
passwd your_username
If the error continues, stop rather than repeatedly editing account files by hand. Filesystem damage, a full root partition, or unusual authentication configuration can require a different repair path.
The new password works for login but not for old encrypted data
An account password and a disk-encryption passphrase are not the same credential. Ubuntu’s security documentation explains that full-disk encryption uses its own passphrase-derived key material. If the machine asks for a LUKS, TPM-backed encryption, or recovery key before the operating system starts, you must satisfy that encryption prompt before the account password reset can help. See Ubuntu full-disk encryption documentation.
There is no recovery-mode entry
Do not assume that the system is broken. GRUB configuration, hidden menus, customized kernels, dual-boot setups, or vendor firmware can change what appears. A live USB can be used to mount the installed system and perform a controlled repair, but device names and encrypted-volume handling differ enough that a one-size-fits-all command sequence would be unsafe. If you take that route, first identify the actual root partition and confirm whether encryption is present.
You are not sure which HamoniKR version is installed
After you regain access, run:
cat /etc/os-release
Keep the output with your maintenance notes. HamoniKR currently publishes version-specific documentation, and recovery screens may differ across releases. The current project guide describes HamoniKR as an Ubuntu-family operating system and documents its Cinnamon-based desktop environment in HamoniKR’s Ubuntu integration documentation.
Post-reset checklist
Confirm you can sign in with the new password.
Run sudo -v to confirm administrator authentication.
Check that your files and home directory open normally.
Store the new password in a trusted password manager rather than a plain-text note.
If the system uses full-disk encryption, verify that its recovery key is stored separately from the computer.
If you intentionally enabled direct root login in the past, reconsider whether you still need it; the default Ubuntu-family model is to administer through sudo.
What this procedure does and does not do
This process changes a local account password by using authorized physical recovery access. It does not recover the old password, decrypt data whose encryption key is unknown, repair a damaged filesystem, or recover credentials for online services. It also does not prove that every HamoniKR release presents the same recovery-menu labels. The commands mount -o remount,rw / and passwd username are standard Linux/Ubuntu-family operations; the surrounding boot-menu workflow can vary with firmware, GRUB configuration, disk encryption, and the installed HamoniKR release.
For most HamoniKR desktop installations, the key practical takeaway is simple: reset the password of the administrator user created during installation, then continue using sudo. Only set a root password if your system was intentionally configured to use direct root authentication and you understand the security implications.