Can not create rhn users using the api

Solution Verified - Updated -

Issue

  • I have created a very basic python script to create rhn users, but it fails with the following error:
xmlrpclib.Fault: <Fault -1: 'Could not find method createUser in class class com.redhat.rhn.frontend.xmlrpc.user.UserHandler'>
  • The script is this:
#!/usr/bin/env python
import xmlrpclib, httplib, sys

SATELLITE_URL = "http://xmlrpc.rhn.redhat.com/rpc/api"
SATELLITE_LOGIN = "admin"
SATELLITE_PASSWORD = ""

client = xmlrpclib.Server(SATELLITE_URL, verbose=0)

key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)
addr = "xxxxxx"
addr2 = "xxxxxx"
city = "xxxxxx"
country = "US"
email = "email@domain.com"
first = "xxxxxx"
last = "xxxxxx"
login = "xxxxxx_test_api"
password = "xxxxxx"
phone = "xxxxxx"
prefix = "Mr."
state = ""
county = ""
zip = "12345"

user = client.user.createUser(key,addr,addr2,city,country,email,first,last,login,password,phone,prefix,state,county,zip)

client.auth.logout(key)

Environment

  • Red Hat Network 5.2.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.