GoAdmio

connect

Create GoAdmio's root-level SSH account and set a new random password for it

On this page: Overview · Quick start · Syntax · Output · Examples · Troubleshooting · Details · See also


Overview

/go/connect creates, or resets, the system account that GoAdmio itself uses to log in to the server over SSH. The account has full root privileges. The command:

This is GoAdmio's own system account. It is not a hosting account and is not the same as admin, which grants administrator privileges in the GoAdmio panel.


Quick start

# Create or reset GoAdmio's root-level SSH account
/go/connect

[!WARNING] The account has user ID 0, so it is equivalent to root. Its password is stored in plain text in /var/lib/sqlite/config.db, and every run replaces it with a new one. Don't create, share, or use this account for anything other than GoAdmio.


Syntax

/go/connect

The command takes no options or arguments. Any you pass are ignored (they are only written to the log).

Run it as root, or from an account with passwordless sudo.


Output

The command prints nothing, including on success. It doesn't display the new password.

On AlmaLinux, Rocky, CentOS, Red Hat, and Fedora, errors from account creation and password setting are hidden. On Debian and Ubuntu, errors from setting the password are shown.

Every run is logged with a timestamp, for example [Nov 20 09:15:02]# connect, to /var/log/go/connect.log.


Examples

# Create or reset the account
/go/connect
# Confirm that the account exists and has user ID 0
grep ':0:0:' /etc/passwd
# Show the stored password
sqlite3 /var/lib/sqlite/config.db "SELECT SSHPassword FROM Config;"

Troubleshooting

Symptom Likely cause Fix
GoAdmio can't log in after running The new password was saved, but the account wasn't created or updated. Check grep ':0:0:' /etc/passwd and run /go/connect again.
Nothing changed on the system, but the stored password did The operating system isn't supported. The database is updated before the OS is checked. Supported: AlmaLinux, Rocky, CentOS, Red Hat, Fedora, Debian, Ubuntu.
usermod: user '<name>' does not exist on Debian or Ubuntu Account creation failed, for example because the username is empty. Run config to create config.php, then run /go/connect again.
The account name looks different from before config.php is missing, so the name was derived from the server's public IP and MAC address. Create config.php with config so the stored name is used.
Error: unable to open database or no such table: Config GoAdmio's configuration database is missing or incomplete. Check that GoAdmio is fully installed.
Could not chdir to home directory when logging in with the account The account is created without a home directory. Normal.
The password changed unexpectedly Every run generates a new one. Read the current value from the database (see Examples).

Details

Steps

  1. Reads the operating system from /usr/local/goadmio/linux/os.db.
  2. Gets the account name:
    • from SSHUsername in /usr/local/goadmio/include/config/config.php if the file exists, otherwise
    • from go plus 13 characters of an MD5 hash of the server's public IP and MAC address, the same way config does.
  3. Generates a random password of 16 letters and digits.
  4. Saves it with UPDATE Config SET SSHPassword=... in /var/lib/sqlite/config.db. The statement has no WHERE clause, so it applies to every row of the Config table.
  5. Creates the account with useradd -M -ou 0 -g 0, which means no home directory, user ID 0, and group ID 0. If the account already exists, this step fails silently and the existing account is kept.
  6. Sets the account's password.
Family Systems How the password is set
RHEL AlmaLinux, Rocky, CentOS, Red Hat, Fedora passwd --stdin
Debian Debian, Ubuntu usermod --password with an MD5-crypt hash from openssl passwd -1

Notes


See also

Command Description
config Create GoAdmio's config.php, which stores the database and SSH login settings
ssh Rewrite /etc/ssh/sshd_config with GoAdmio hardening
permitrootlogin Allow root SSH login from a specific IP
root Change the GoAdmio root password
admin Grant or revoke GoAdmio administrator privileges
port Change the default SSH port (22) to another port