arjunsuhsass

Registered
Sep 13, 2023
2
0
1
United Kingdom
cPanel Access Level
Root Administrator
I have a problem with a IT person and Seems he did things with the access to Cpanel and WHM.

I have access to the serve via SSH. I'm trying to change the passwords with /scripts/chpass for Cpanel, but it doesn't work. I'm trying to access to WHM with root user and ssh's password, but it doesn't work. Also, I try to change it with passwd, sudo passwd or passwd root and put in a new password, but also, it doesn't work. Also, I try with whmapi1 user=root password=mynewpassword, and guess... it doesn't work. What I'm missing? How I can change access? Thanks
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! When you access the server over SSH, are you logging in as "root" or at least gaining root access through sudo? If you have the root password for the server, that is also the root password for WHM - there is not a way to get those out of sync.

When you try and login through WHM, is it just telling you the password is wrong?
 

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
Did the IT person possibly disable root logins?

Check the file:

Code:
/etc/ssh/sshd_config
Look for a line with the following:

Code:
#PermitRootLogin yes
or

Code:
PermitRootLogin no

If either is found you can simply change it to:

Code:
PermitRootLogin yes
And then restart the SSH service.
 

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
@ResellerWiz - the OP's second sentence is "I have access to the serve via SSH" so that wouldn't be the issue :D
The OP said he had access to the server, but did not specifically say if he was accessing as root.

A lot of server providers disable root logins and create a separate account as a security measure, so I figured that may have been the case.

If they are in fact accessing SSH as root, then you are absolutely correct, that would not be the issue. :D
 

quietFinn

Well-Known Member
Feb 4, 2006
2,109
580
493
Finland
cPanel Access Level
Root Administrator
... I'm trying to access to WHM with root user and ssh's password, but it doesn't work....
What does "it does not work" mean?
Do you get the login screen?

Do you connect to SSH as root or as a normal user?

Saying "it does not work" is not enough, you should tell exactly what happens.
 
  • Like
Reactions: cPRex

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
@cPRex thanks but I got my solution at stackoverflow thanks to everyone for your time.
Hmm... appears to be unanswered from what I see: