username with the /go/username Command

/go/username renames the username of an existing hosting account in one command. It: The domain and the /home/<domain> folder keep their names. Only the username changes. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Rename an account's username
/go/username example.com newname

Arguments

Argument Position Required Default Notes
<domain> 1 Yes — The account’s domain. /home/<domain> must exist.
<username> 2 Yes — The new username. See username rules.

Examples

# Rename an account's username
/go/username example.com example

# Use a username with digits, dots, and hyphens
/go/username shop.example.net shop-01

Output

The command prints plain text, not JSON.

Outcome What you get
Account renamed No message from this command. Any output comes from adduser and phpmyadmin.
Invalid username Invalid Username <username>
Username too short Username must be at least 3 chars
Username already in use Username <username> already exists.
/home/<domain> doesn’t exist Directory /home/<domain> not exists.

Every validation failure exits with status 1 before anything is changed.

[!WARNING]
The steps after validation are not wrapped in a transaction. If one fails partway, the earlier changes stay in place, and the databases may show the new username while the system user is still the old one. Check the output of each step if something goes wrong.

See the full reference at /go/username and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

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