New EC2 Instance - Cannot create Root User

Operating System & Version
AlmaLinux
Nov 21, 2019
20
1
3
Australia
cPanel Access Level
Root Administrator
Hi all,

I am experiencing some very odd behaviour with a new EC2 instance.

I am trying to SSH into the system for the first time as ec2-user@IP-ADDRESS -i LOCATION/TO/key.pem

When I log in and then enter sudo su -l, it is telling me to visit a web address at cprapid.com

The issue is the subdomain it is telling me to go to DOES NOT match the elastic IP of the current machine.

In fact, when I ssh into this new instance as ec2-user@ it is showing the WRONG IP address completely after my username in the command line.

It's almost like it thinks this server already has a root user created. But I do not. And visiting the URL the command line is advising, doesn't resolve at all. It just times out.

Any help is greatly appreciated.

Scott
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! I'm not sure I am completely following the issue that is happening on your system, but every server does have a root user as "root" is created as part of the server setup process.

I can't comment on the ec2-user access, but WHM is always accessible with the root username and password at https://x.x.x.x:2087, where "x.x.x.x" is your server's IP.

If you aren't able to access the system as root, you'd have to contact Amazon to get assistance with that, and then I would expect everything to work as you are expecting.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,109
580
493
Finland
cPanel Access Level
Root Administrator
@scottrichardson
when you log into your server in SSH you should 1st set root's password:
sudo passwd root
after that you can su to root:
su -

and you can connect to WHM with user root & the password you have set.
 
Nov 21, 2019
20
1
3
Australia
cPanel Access Level
Root Administrator
@scottrichardson
when you log into your server in SSH you should 1st set root's password:
sudo passwd root
after that you can su to root:
su -

and you can connect to WHM with user root & the password you have set.
Yeah this is what I tried to do, however when I entered the commands to set the password, the ssh client told me to log into WHM for the first time and set the root password via that - which I did and it's now working. But just odd that it didn't follow the typical process as indicated in the cPanel documentation.

When I set up my various CentOS WHM environments, I was able to set the root password via SSH as standard.

Ultimately it doesn't really matter as I don't really use root via SSH for anything.

Worth at least highlighting that my experience was different and for other people to be aware of it when setting up an EC-2 instance at AWS with the AlmaLinux+cPanel AMI.