Description of problem: Registration needs an org name after create a user with '--default_organization' successfully on SAM server Version-Release number of selected component (if applicable): python-rhsm-1.8.12-1.el5 subscription-manager-gui-1.8.11-1.el5 subscription-manager-firstboot-1.8.11-1.el5 subscription-manager-1.8.11-1.el5 candlepin-0.8.9-1.el6_4.noarch candlepin-scl-1-5.el6_4.noarch candlepin-scl-quartz-2.1.5-5.el6_4.noarch candlepin-scl-rhino-1.7R3-1.el6_4.noarch candlepin-scl-runtime-1-5.el6_4.noarch candlepin-tomcat6-0.8.9-1.el6_4.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-certs-tools-1.4.2-2.el6sat.noarch katello-cli-1.4.2-8.el6sat.noarch katello-cli-common-1.4.2-8.el6sat.noarch katello-common-1.4.2-17.el6sam_splice.noarch katello-configure-1.4.3-17.el6sam.noarch katello-glue-candlepin-1.4.2-17.el6sam_splice.noarch katello-glue-elasticsearch-1.4.2-17.el6sam_splice.noarch katello-headpin-1.4.2-17.el6sam_splice.noarch katello-headpin-all-1.4.2-17.el6sam_splice.noarch katello-selinux-1.4.3-3.el6sat.noarch signo-katello-0.0.18-1.el6sat.noarch signo-0.0.18-1.el6sat.noarch thumbslug-0.0.32-1.el6sam.noarch thumbslug-selinux-0.0.32-1.el6sam.noarch How reproducible: always Steps to Reproduce: 1. Create 2 orgs(org-gss-test-1a and org-gss-test-1b) on SAM Server. 2. Create a user by specifying one org as default org on SAM server. [root@samserv ~]# headpin -u admin -p admin user create --username=qianqian --password=123qwe --email=qianqian --default_organization=org-gss-test-1a --default_environment=Library Successfully created user [ qianqian ] 3. Check the default org. [root@samserv ~]# headpin -u admin -p admin user info --username=qianqian --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- User Information --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ID : 6 Username : qianqian Email : qianqian Disabled : False Default Organization : org-gss-test-1a Default Environment : Library Default Locale : None 4. Assign a role for the newly created account. [root@samserv ~]# headpin -u admin -p admin user assign_role --username=qianqian --role=Administrator User 'qianqian' assigned to role 'Administrator' 5. Configure a test client to register to SAM [root@dhcp-65-110 ~]# cat /etc/rhsm/rhsm.conf hostname = samserv.redhat.com baseurl=https://samserv.redhat.com:8088 6. Register the client to SAM using above account, subscription-manager prompts for an org name. [root@dhcp-65-110 ~]# subscription-manager register --username=qianqian --password=123qwe Organization: 7. Enter the other org (which is not the default org of the new account) to try to register. [root@dhcp-65-110 ~]# subscription-manager register --username=qianqian --password=123qwe Organization: org-gss-test-1b The system has been registered with ID: 83e94599-9a5a-4e2e-9e2b-09768ac76672 Actual results: Although default org is bound with the account when account creation, an org name prompts for registration. When enter an org which is not the default org, the registration is successful. Expected results: If a default org is bound with the account when account creation, there is no need to enter org name for registration Additional info:
Unfortunately there is no way currently to tell subscription-manager to use a default organization. If no org is specified, sub-mgr queries for all orgs available to the specified user. Not sending back all of the owners would break other users of that same API call. If this is an important feature, please re-open against subscription-manager with a description of RFE.