Sometimes you don’t know or want to change the root password to be able to log into WHM as root (yes I know you shouldn’t log in as root, but sometimes you do). Here’s the command to do that via CLI

whmapi1 create_user_session user=root service=whostmgrd locale=en

This will return something like to following

  cp_security_token: /cpsess9427258339
  expires: '1596644759'
  locale: en
  service: whostmgrd
  session: root:J7omtbeEeUhJ9yPK:create_user_session,yAs86MVYrHT46avjRLAGxhHaEFrFV3Hf
  command: create_user_session
  reason: Created session
  result: 1
  version: 1

You will use the URL and it will take you right into WHM