Hide Forgot
Description of problem: If you register through the GUI and accidentally include an extra space or two after the username, we handle it gracefully and trim it, allowing the user to successfully continue. While the GUI is the more important area to watch for that, due to copy/paste sometimes adding in trailing spaces, it would be nice if we did the same magic for the username on CLI registration. Currently if you input "admin " in the CLI, it will error out with Invalid Credentials, but the same "admin " is accepted as fine through the Registration Dialog in the GUI. Should just be running the given username through a trim or something right?
https://github.com/candlepin/subscription-manager/pull/804
commit 8f7e7cd7f085605796e703f6a1a4e82984da2fe9 Author: Bryan Kearney <bkearney> Date: Mon Oct 28 14:42:32 2013 -0400 1023166: Strip leading and trailing whitespaces from all usernames and passwords provided on the cli
Demonstration of rejected username (with trailing whitespace) credentials... [root@jsefler-7 ~]# rpm -q subscription-manager subscription-manager-1.10.5-1.el7.x86_64 [root@jsefler-7 ~]# subscription-manager config --server.hostname=subscription.rhn.stage.redhat.com --server.port=443 --server.prefix=/subscription [root@jsefler-7 ~]# subscription-manager register --force --username="rhel7beta" Password: The system has been registered with ID: bc800b82-9561-4c11-bbae-1139ab426c2a [root@jsefler-7 ~]# subscription-manager register --force --username="rhel7beta " The system with UUID bc800b82-9561-4c11-bbae-1139ab426c2a has been unregistered Password: Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html [root@jsefler-7 ~]# ^^ When --username="rhel7beta " has trailing whitespace, the registration is rejected. Update subscription-manager (NOT SHOWN) Verification that username with trailing whitespace credentials is now tolerated... [root@jsefler-7 ~]# rpm -q subscription-manager subscription-manager-1.10.6-1.el7.x86_64 [root@jsefler-7 ~]# subscription-manager register --force --username="rhel7beta "Password: The system has been registered with ID: 8fe534be-72d5-467a-9f2e-6ae7052c4332 [root@jsefler-7 ~]# subscription-manager register --force --username=" rhel7beta" The system with UUID 8fe534be-72d5-467a-9f2e-6ae7052c4332 has been unregistered Password: The system has been registered with ID: 02f63b37-77c5-4890-9bb2-e861dd77e6aa [root@jsefler-7 ~]# VERIFIED: Specifying username with leading or trailing whitespace during registration is now tolerated.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.