Bug 623969 - Unable to create user :Pulp-admin
Summary: Unable to create user :Pulp-admin
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Mike McCune
QA Contact:
URL:
Whiteboard:
: 624511 (view as bug list)
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2010-08-13 10:11 UTC by Shveta
Modified: 2011-08-16 14:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:01:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Shveta 2010-08-13 10:11:49 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

[root@shveta ~]# pulp-admin -u admin -p admin user create --newusername=shveta --newpassword=redhat1 --name=test
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/users.py\", line 50, in PUT\n    name=user_data['name'])\n  File \"/usr/lib/python2.6/site-packages/pulp/auditing.py\", line 186, in _audit\n    result = method(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/api/user.py\", line 57, in create\n    hashed_password = password_util.hash_password(password)\n  File \"/usr/lib/python2.6/site-packages/pulp/password_util.py\", line 20, in hash_password\n    hashed_password = pbkdf_sha256(plain_password, salt, NUM_ITERATIONS)\n  File \"/usr/lib/python2.6/site-packages/pulp/password_util.py\", line 14, in pbkdf_sha256\n    result = HMAC(result, salt, sha256).digest() # use HMAC to apply the salt\n  File \"/usr/lib64/python2.6/hmac.py\", line 72, in __init__\n    self.outer.update(key.translate(trans_5C))\nTypeError: character mapping must return integer, None or unicode\n"


========================================================

[root@shveta ~]# pulp-admin -u admin -p admin user create --newusername=shveta --newpassword=password
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/users.py\", line 50, in PUT\n    name=user_data['name'])\n  File \"/usr/lib/python2.6/site-packages/pulp/auditing.py\", line 186, in _audit\n    result = method(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/api/user.py\", line 57, in create\n    hashed_password = password_util.hash_password(password)\n  File \"/usr/lib/python2.6/site-packages/pulp/password_util.py\", line 20, in hash_password\n    hashed_password = pbkdf_sha256(plain_password, salt, NUM_ITERATIONS)\n  File \"/usr/lib/python2.6/site-packages/pulp/password_util.py\", line 14, in pbkdf_sha256\n    result = HMAC(result, salt, sha256).digest() # use HMAC to apply the salt\n  File \"/usr/lib64/python2.6/hmac.py\", line 72, in __init__\n    self.outer.update(key.translate(trans_5C))\nTypeError: character mapping must return integer, None or unicode\n"



[root@shveta ~]# pulp-admin user
usage: pulp-admin -u <username> -p <password> user [OPTIONS]
Supported Actions:
        create         Create a user            
        delete         Delete a user            
        list           List available users     

[root@shveta ~]# pulp-admin -u admin -p admin user list
+-------------------------------------------+
             Available Users                 
+-------------------------------------------+

Login :                 admin                        
Name  :                 None

Comment 1 Pradeep Kilambi 2010-08-17 15:03:14 UTC
*** Bug 624511 has been marked as a duplicate of this bug. ***

Comment 2 Preethi Thomas 2010-09-08 14:04:05 UTC
from the pulp log

2010-09-08 10:11:24,505 [ERROR][MainThread] check_admin_cert() @ role_check.py:177 - ID in admin certificate for user [admin] was incorrect
2010-09-08 10:11:24,600 [ERROR][MainThread] report_error() @ base.py:55 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py", line 51, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py", line 106, in check_roles
    result = f(instance, *fargs, **kw)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/users.py", line 52, in PUT
    user_data['name'])
  File "/usr/lib/python2.6/site-packages/pulp/server/auditing.py", line 186, in _audit
    result = method(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/user.py", line 57, in create
    hashed_password = password_util.hash_password(password)
  File "/usr/lib/python2.6/site-packages/pulp/server/auth/password_util.py", line 41, in hash_password
    hashed_password = pbkdf_sha256(plain_password, salt, NUM_ITERATIONS)
  File "/usr/lib/python2.6/site-packages/pulp/server/auth/password_util.py", line 35, in pbkdf_sha256
    result = HMAC(result, salt, sha256).digest() # use HMAC to apply the salt
  File "/usr/lib64/python2.6/hmac.py", line 72, in __init__
    self.outer.update(key.translate(trans_5C))
TypeError: character mapping must return integer, None or unicode

Comment 3 Mike McCune 2010-09-21 19:26:47 UTC
commit 29cdb50315a3c358c958719a9ce3e9952956a56a
Author: Mike McCune <mmccune>
Date:   Tue Sep 21 12:25:39 2010 -0700

    623969 - make sure we convert the unicode pass to a string before hmac

Comment 4 Preethi Thomas 2010-09-28 12:57:47 UTC

[root@preethi ~]# pulp-admin user create --newusername=user-test --newpassword=redhat
 Successfully created User [ user-test ] with name [  ]

Comment 5 Preethi Thomas 2011-08-16 14:01:34 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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