Bug 861195 - spacecmd user_create via CLI does not honor --pam
spacecmd user_create via CLI does not honor --pam
Status: CLOSED CURRENTRELEASE
Product: Fedora EPEL
Classification: Fedora
Component: spacecmd (Show other bugs)
el6
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 15:02 EDT by Matthew Davis
Modified: 2013-07-02 11:42 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-02 11:42:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Davis 2012-09-27 15:02:11 EDT
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@redhat.com -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 11:42:40 EDT
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.