Bug 861195 - spacecmd user_create via CLI does not honor --pam
Summary: spacecmd user_create via CLI does not honor --pam
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: spacecmd
Version: el6
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-27 19:02 UTC by Matthew Davis
Modified: 2013-07-02 15:42 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-02 15:42:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matthew Davis 2012-09-27 19:02:11 UTC
If you attempt to create a user using spacecmd directly from the CLI (not from the spacecmd prompt), it does not honor the --pam flag. For example:

# spacecmd -s satellite.phx.salab.redhat.com user_create -- -u mdavis -f matt -l davis -e mdavis -p redhat --pam

That throws the following error:

INFO: Connected to https://satellite.phx.salab.redhat.com/rpc/api as satadmin
ERROR: com.redhat.rhn.common.translation.TranslationException: Could not find translator for class java.lang.Boolean to class java.lang.Integer

Using the following patch fixes that.

--- /usr/lib/python2.6/site-packages/spacecmd/user.py	2010-11-05 11:27:30.000000000 -0700
+++ /tmp/user.py	2012-09-27 11:57:13.724244567 -0700
@@ -43,7 +43,7 @@
                 Option('-l', '--last-name', action='store'),
                 Option('-e', '--email', action='store'),
                 Option('-p', '--password', action='store'),
-                Option('', '--pam', action='store_true') ]
+                Option('', '--pam', action='store_const', const=1) ]
 
     (args, options) = parse_arguments(args, options)
 



Version-Release number of selected component (if applicable):
spacecmd-1.2.2-1.el6.noarch

Comment 1 Miroslav Suchý 2013-07-02 15:42:40 UTC
Fixed in spacecmd-1.7.5-1 (see upstream bug 766887)
Epel6 have spacecmd-1.9.4-1.el6.

Consider done.


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