Getting "http error 401-unauthorized:invalid username or password error" while trying to register system
Environment
- Red Hat Enterprise Linux
- Red Hat Subscription Management (RHSM)
Issue
- While registering the client machine to the customer portal using the
subscription-manager register
command, it fails with the below error:
# subscription-manager register --username "xxxxxx"--password "xxxxxxxx"
Registering to: subscription.rhsm.redhat.com:443/subscription
HTTP error (401 - Unauthorized): Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html
- Getting
invalid username or password
while trying to register the system with RHSM.
Resolution
- To successfully register the system with subscription-manager (RHSM), blank space or hyphen must be avoided in the password.
- Reset the password, if the password contains a space in it.
To reset the password click here
Root Cause
Subscription-manager (RHSM) does not honor the value when a blank space or hyphen is added to a password, instead consider adding special characters is suggested.
Diagnostic Steps
Verify if the password contains blank space or hyphen.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
3 Comments
This solution works not in my case. My password doesn't contain blanks. Even with a legal password the registration of my system fails in that way.
I have the same issue also, trying to subscribe a x86_64 RHEL7.7 virtual machine
my issue was using the email address and not the username...
# subscription-manager clean
# subscription-manager register --username=username_under_change_password --auto-attach
# yum clean all
# yum repolist
https://www.redhat.com/wapps/ugc/protected/password.html
cheers