Bug 746259 - Got “Insufficient permissions” while register activationkey with ” =”
Summary: Got “Insufficient permissions” while register activationkey with ” =”
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 5.8
Assignee: Alex Wood
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 715031 769266
TreeView+ depends on / blocked
 
Reported: 2011-10-14 14:57 UTC by spandey
Modified: 2015-04-23 23:57 UTC (History)
7 users (show)

Fixed In Version: 0.98.5-1.el5
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2012-02-21 06:41:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0154 0 normal SHIPPED_LIVE subscription-manager bug fix update 2012-02-20 15:06:04 UTC

Description spandey 2011-10-14 14:57:56 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
3/3

Got “Insufficient permissions” while register activationkey  with” =”

Prerequisites:
Rhel6.2 client with following rpm 
subscription-manager-firstboot-0.96.15-1.el6.x86_64
.
subscription-manager-gnome-0.96.15-1.el6.x86_64.

subscription-manager-0.96.15-1.el6.x86_64
.

Steps to Repro : 

Execute following command on client console 

subscription-manager register --org admin –activationkey=

Expected Result : 
Above Command should display usage for activationkey  ,following message 

[root@rhel62beta ~]# subscription-manager register --org admin --activationkey

Usage: subscription-manager register [OPTIONS]



subscription-manager: error: --activationkey option requires an argument


Actual Result : 
[root@rhel62beta ~]# subscription-manager register --org admin --activationkey=

Insufficient permissions


command is taking “= “ as an argument and displaying 
Insufficient permissions


rhsm.log output 


2011-10-14 17:58:19,138 [INFO]  @connection.py:350 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2011-10-14 17:58:19,140 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-14 17:58:19,140 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-ca.pem'
2011-10-14 17:58:19,141 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-14 17:58:19,141 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-14 17:58:19,142 [WARNING]  @connection.py:383 - Error fetching supported resources, this UEPConnection is likely not usable:
2011-10-14 17:58:19,142 [ERROR]  @connection.py:385 - No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 376, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 252, in request_get
    return self._request("GET", method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 191, in _request
    context.load_cert(self.cert_file, keyfile=self.key_file)
  File "/usr/lib64/python2.6/site-packages/M2Crypto/SSL/Context.py", line 76, in load_cert
    m2.ssl_ctx_use_cert(self.ctx, certfile)
SSLError: No such file or directory
2011-10-14 17:58:19,143 [INFO]  @connection.py:362 - Connection Established: host: 10.65.193.159, port: 8443, handler: /candlepin
2011-10-14 17:58:19,202 [INFO]  @connection.py:357 - Using no auth
2011-10-14 17:58:19,203 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-14 17:58:19,203 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-ca.pem'
2011-10-14 17:58:19,204 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-14 17:58:19,204 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-14 17:58:19,205 [DEBUG]  @connection.py:209 - Making request: GET /candlepin/
2011-10-14 17:58:19,216 [DEBUG]  @connection.py:218 - Response status: 200
2011-10-14 17:58:19,217 [DEBUG]  @connection.py:379 - Server supports the following resources:
2011-10-14 17:58:19,217 [DEBUG]  @connection.py:380 - {'serials': '/serials', 'status': '/status', 'owners': '/owners', 'jobs': '/jobs', 'users': '/users', 'consumers': '/consumers', 'subscriptions': '/subscriptions', 'admin': '/admin', 'consumertypes': '/consumertypes', 'statistics/generate': '/statistics/generate', 'migrations': '/migrations', 'content': '/content', 'pools': '/pools', 'products': '/products', 'roles': '/roles', 'activation_keys': '/activation_keys', 'atom': '/atom', 'entitlements': '/entitlements', 'events': '/events', 'crl': '/crl', 'rules': '/rules'}
2011-10-14 17:58:19,217 [INFO]  @connection.py:362 - Connection Established: host: 10.65.193.159, port: 8443, handler: /candlepin
2011-10-14 17:58:19,401 [DEBUG]  @cert_sorter.py:89 - Sorting product and entitlement cert status for: 2011-10-14 12:28:19.400814+00:00
2011-10-14 17:58:19,404 [DEBUG]  @cert_sorter.py:165 - Installed product IDs: ['100000000000002']
2011-10-14 17:58:19,405 [DEBUG]  @cert_sorter.py:93 - valid entitled products: []
2011-10-14 17:58:19,405 [DEBUG]  @cert_sorter.py:94 - expired entitled products: []
2011-10-14 17:58:19,405 [DEBUG]  @cert_sorter.py:95 - partially entitled products: []
2011-10-14 17:58:19,406 [DEBUG]  @cert_sorter.py:96 - unentitled products: ['100000000000002']
2011-10-14 17:58:19,406 [DEBUG]  @cert_sorter.py:97 - future products: []
2011-10-14 17:58:19,407 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-14 17:58:19,407 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-ca.pem'
2011-10-14 17:58:19,408 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-14 17:58:19,408 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-14 17:58:19,409 [DEBUG]  @connection.py:209 - Making request: POST /candlepin/consumers?owner=admin&activation_keys=
2011-10-14 17:58:19,434 [DEBUG]  @connection.py:218 - Response status: 403
2011-10-14 17:58:19,436 [ERROR]  @managercli.py:608 - Insufficient permissions
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 605, in _do_command
    installed_products=self.installed_mgr.format_for_server())
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 426, in registerConsumer
    return self.conn.request_post(url, params)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 255, in request_post
    return self._request("POST", method, params)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 219, in _request
    self.validateResponse(result)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 239, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: Insufficient permissions

Comment 2 Alex Wood 2011-11-29 15:44:50 UTC
Committed e43fadd881c2eca9822eea6b69598683a0de8761 to subscription-manager

Available in 0.98.3+

Comment 5 John Sefler 2011-12-06 19:44:54 UTC
Verifying Version...
[root@jsefler-onprem-5server ~]# rpm -q subscription-manager
subscription-manager-0.98.5-1.el5


[root@jsefler-onprem-5server ~]# subscription-manager register --org=admin --activationkey
usage: subscription-manager register [OPTIONS]

subscription-manager: error: --activationkey option requires an argument[root@jsefler-onprem-5server ~]# 
[root@jsefler-onprem-5server ~]# subscription-manager register --org=admin --activationkey=
Error: Must specify an activation key
[root@jsefler-onprem-5server ~]# 


IDEALLY BOTH OF THESE CASES ABOVE WOULD YIELD IDENTICAL RESULTS.  NEVERTHELESS THE EFFECTIVE MESSAGE IS THE SAME "--activationkey option requires an argument" VERSUS "Must specify an activation key"

Moving to VERIFIED

Comment 6 William Poteat 2012-01-23 13:14:58 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 7 errata-xmlrpc 2012-02-21 06:41:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0154.html


Note You need to log in before you can comment on or make changes to this bug.