root
Change the server's Linux
rootpassword (and optionally thegouser's) and save an encrypted copy of it for GoAdmio in/var/go/etc/go.key
- Command:
/go/root - Category: Security
- Required argument:
<password> - Output: One confirmation line
- Last updated: 2026-11-21
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/root sets a new password for the operating system's root account. GoAdmio keeps its own encrypted copy of that password, so changing it with plain passwd can leave GoAdmio with an outdated one. /go/root does both. It:
- sets the new
rootpassword on the server - optionally sets the same password for the
gouser (--go) - deletes
/root/.ssh/known_hosts - encrypts the password and saves it to
/var/go/etc/go.key - prints a confirmation line
It does not change the GoAdmio panel's admin password (admin), the database root password (mysqlset), or hosting account passwords (password).
[!WARNING] The confirmation line is printed every time, even when nothing was changed. Errors from
passwdandusermodare not checked, andgo.keyis updated regardless. Always test the new password before you close your current session.
Quick start
# Change the root password
/go/root 'N3w-Str0ng-P@ssword'
# Change the root and go passwords together
/go/root 'N3w-Str0ng-P@ssword' --go
Syntax
/go/root <password> [--go]
| Form | Behavior |
|---|---|
/go/root <password> |
Changes the root password. |
/go/root <password> --go |
Changes the root and go passwords to the same value. |
/go/root |
Does nothing and exits with status 1, with no message. |
The password must be the first argument. Put it in single quotes so the shell doesn't treat characters such as !, $, or spaces specially. Run the command as root. There is no password confirmation prompt.
Options
| Argument | Required | Default | Notes |
|---|---|---|---|
<password> |
Yes | — | The new password. No length or strength rules are applied. |
--go |
No | — | Also sets the go user's password. It is detected as text anywhere in the arguments, so a password that contains --go triggers it too. |
Output
| Outcome | What you get |
|---|---|
| Any run with a password | Your ROOT password has been changed successfully. |
| No argument | Nothing, and exit status 1. |
Notes on the output:
- The message doesn't prove that the password changed. See Troubleshooting.
- Every run is logged to
/var/log/go/root.logwith a timestamp and********in place of the password.
Examples
# Change the root password only
/go/root 'N3w-Str0ng-P@ssword'
# Change root and go, then confirm the date of the change
/go/root 'N3w-Str0ng-P@ssword' --go
passwd -S root
passwd -S go
# Remove the password from your shell's history afterwards
history -c
history -w
# Confirm the encrypted copy was updated
ls -l /var/go/etc/go.key
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Nothing happens and nothing is printed | No argument was given. | Pass the new password. |
passwd or usermod permission errors |
The command wasn't run as root. | Run it as root. |
| The confirmation appeared, but the new password doesn't work | The OS isn't supported, passwd failed, or the password has characters that broke the command. |
Check passwd -S root, and look for errors above the message. Set the password directly with passwd if needed, then run /go/root again with the same password so go.key matches. |
| Password with spaces fails on Debian or Ubuntu | The password is passed unquoted to openssl passwd, so it is split into several arguments. |
Avoid spaces. |
The password appears in history |
history -c inside the script can't clear your own shell's history. |
Clear it yourself, as shown in Examples. |
go still has its old password |
--go wasn't passed. |
Run the command again with --go. |
go was changed when you didn't want it |
The password contains --go. |
Choose a different password. |
| GoAdmio can't use the saved root password after a network change | The key for go.key is built from the server's network card addresses. A new interface (for example a Docker bridge) can change it. |
Run /go/root '<current password>' again to rebuild go.key. |
ifconfig: command not found |
The net-tools package isn't installed. |
Install it. Otherwise go.key may be written with the wrong key. |
| SSH asks to confirm host keys again | /root/.ssh/known_hosts was deleted. |
Expected. Accept the keys again. |
| You can't log in to SSH as root with the new password | Root password login is blocked by the SSH settings. | See permitrootlogin and ssh. |
Details
What happens on each run
flowchart TD
A["root password"] --> B["Log the call, hide the password"]
B --> C{"Any argument?"}
C -- "No" --> X["Exit 1, no message"]
C -- "Yes" --> D{"OS family"}
D -- "RHEL family" --> E["passwd root --stdin, and go if --go"]
D -- "Debian or Ubuntu" --> F["Hash with openssl passwd, usermod -p"]
D -- "Other" --> G["Nothing is changed"]
E --> H
F --> H
G --> H["Delete /root/.ssh/known_hosts"]
H --> I["Encrypt the password into /var/go/etc/go.key"]
I --> J["Print: changed successfully"]
How the password is set
| OS family | Method |
|---|---|
| AlmaLinux, Rocky, CentOS, Red Hat, Fedora | passwd root --stdin, then the same for go with --go. |
| Debian, Ubuntu | The password is hashed with openssl passwd and set with usermod -p. The hash type is whatever openssl passwd uses by default on that server. Older versions use traditional crypt, which only considers the first 8 characters. |
| Any other OS | Nothing is changed, but the rest of the command still runs. |
The encrypted copy
The plain password is encrypted with AES-128 and saved to /var/go/etc/go.key. The encryption passphrase is derived from the MAC addresses of all the server's network interfaces. It is not a secret key. Anyone who can read the file and knows the method can recover the password, and the file may stop decrypting if the interfaces change.
Where the password is exposed
| Place | Exposure |
|---|---|
| Your command line | Visible in your shell history and, briefly, in the process list. |
openssl passwd (Debian, Ubuntu) |
The password is on its command line while it runs. |
openssl enc |
The passphrase derived from the MAC addresses is on its command line while it runs. |
/var/log/go/root.log |
Not exposed. The password is replaced with ********. |
Other effects
/root/.ssh/known_hostsis deleted, so root forgets the host keys of remote servers it has connected to.- Existing SSH sessions stay open. Only new logins need the new password.
See also
| Command | Description |
|---|---|
connect |
Create GoAdmio's root-level SSH account and set a new random password for it |
admin |
Change the admin user's password, or send a login alert for an IP address |
password |
Change a GoAdmio account's FTP, SSH, and panel login password |
mysqlset |
Change the MySQL root password |
permitrootlogin |
Allow root SSH login from a specific IP |
ssh |
Rewrite /etc/ssh/sshd_config with GoAdmio hardening |
port |
Change the default SSH port (22) to another port |