admin
Change the admin user's password, or send a login alert for an IP address
- Command:
/go/admin - Category: Security
- Required option: A new password, or an IPv4 address
- Output: The system's password-change message (none in alert mode)
- Last updated: 2026-11-19
On this page: Overview · Quick start · Syntax · Arguments · Output · Examples · Troubleshooting · Details · See also
Overview
/go/admin manages the admin user. The admin user is the account you log in to the GoAdmio panel with, so you do not have to use the root password. The command does one of two things, depending on its argument:
- A new password: sets it as the password of the
adminuser. - An IPv4 address: looks up where the IP is, then sends an "Admin Login Alerts" email and WhatsApp message. It changes no password.
[!WARNING] The password you pass is part of the command line. It can be visible in the process list and saved in your shell history. The command's own log hides it.
Quick start
# Set a new password for the admin user (run as root)
/go/admin 'N3wP@ssw0rd'
Syntax
/go/admin <password>
/go/admin <ipv4-address>
The command takes one argument and has no -- options. Run it as root. With no argument, it exits with status 1 and prints nothing.
Arguments
| Argument | Mode | What it does |
|---|---|---|
A valid IPv4 address, such as 203.0.113.45 |
Alert mode | Sends the login alert. The password is not changed. |
| Anything else | Password mode | Uses the value as the new admin password. |
An argument that looks like an IPv4 address is always treated as an address. A password such as 10.20.30.40 therefore sends an alert and changes nothing.
Quote passwords that contain special characters or spaces, for example with single quotes. Avoid spaces on Debian and Ubuntu.
Output
Password mode
On AlmaLinux, Rocky, CentOS, Red Hat, and Fedora, passwd prints its usual status messages:
Changing password for user admin.
passwd: all authentication tokens updated successfully.
On Debian and Ubuntu, nothing is printed when the change works.
Alert mode
Nothing is printed. The email and WhatsApp message are sent with /go/sendmail and /go/sendwhatsapp.
| Item | Value |
|---|---|
| Subject | Admin Login Alerts |
| Message | User root just logged in from <IP> (<city> - <country>) |
The message always says root, whatever the argument is.
Examples
# Set the admin user's password
/go/admin 'N3wP@ssw0rd'
# Send a login alert for an address (a test of the alert)
/go/admin 203.0.113.45
# Change the password without putting it on the command line
passwd admin
# Review the log of past runs (arguments are hidden)
tail -n 20 /var/log/go/admin.log
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Nothing happens and the exit status is 1 |
No argument was given. | Pass a password or an IPv4 address. |
| An alert was sent but the password did not change | The password looks like an IPv4 address. | Choose a password that is not in the form 1.2.3.4. |
passwd: Unknown user name 'admin' |
The admin user does not exist on the server. |
Create the user, then run the command again. |
| The password is rejected or wrong on Debian or Ubuntu | A space or special character split the argument. | Quote the password with single quotes, and avoid spaces. |
| Nothing changes and no message is printed | The server's OS is not one of the supported distributions. | Change the password with passwd admin. |
| Panel login fails with the new password | You are logging in as another user. | Log in as admin. |
| The alert shows an empty city or country | The lookup at ipinfo.io failed or returned no data. |
None. The alert is still sent. |
Details
Password mode
| OS | How the password is set |
|---|---|
| AlmaLinux, Rocky, CentOS, Red Hat, Fedora | echo <password> | passwd admin --stdin |
| Debian, Ubuntu | The password is hashed with openssl passwd, then set with usermod -p <hash> admin. |
On any other OS, the command does nothing.
Alert mode
- The address is checked: four numbers from 0 to 255, separated by dots.
- The command downloads
https://ipinfo.io/<ip>to/usr/local/goadmio/tmp/ssh.infoand reads the country and city from it. - It sends the alert by email and WhatsApp.
The address is sent to ipinfo.io for the lookup.
Logging
Every run appends a timestamp to /var/log/go/admin.log. The arguments are replaced with ********, so the password is not recorded.
What a run does
flowchart TD
A["admin arg"] --> B{"Any argument?"}
B -- "No" --> X["Exit 1"]
B -- "Yes" --> C{"Valid IPv4 address?"}
C -- "Yes" --> D["Look up country and city"]
D --> E["Send email and WhatsApp alert"]
C -- "No" --> F{"OS?"}
F -- "AlmaLinux, Rocky, CentOS, Red Hat, Fedora" --> G["passwd admin --stdin"]
F -- "Debian, Ubuntu" --> H["openssl passwd, then usermod -p"]
See also
| Command | Description |
|---|---|
root |
Change the GoAdmio root password |
password |
Change a GoAdmio account password from the command line |
connect |
Grant root privileges to a GoAdmio account |
permitrootlogin |
Allow root SSH login from a specific IP |