Forum Discussion

Marcel_Kuiper_5's avatar
Marcel_Kuiper_5
Icon for Nimbostratus rankNimbostratus
Jun 22, 2007

Adding users on 9.1.2

Hi,

 

 

Since we're changing account names I need to create a lot of users on all of our BigIP systems. However my perl scripting is not succesful so far which has probably to do with the way I pass data to the call -- yes I'm clueless --. I try with this snippet of code:

 

 

$soap = SOAP::Lite

 

-> uri('urn:iControl:Management/UserManagement')

 

-> readable(1)

 

-> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi");

 

eval {

 

$soap->transport->http_request->header

 

(

 

'Authorization' =>

 

'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '')

 

);

 

};

 

 

 

 

$user{'name'} = "tester1";

 

$user{'full_name'} = "tester1 123";

 

 

$UserInfo{'user'} = $user;

 

$UserInfo{'role'} = 0;

 

$UserInfo{'password'} = "*LCK*";

 

$UserInfo{'home_directory'} = "/home/tester1";

 

$UserInfo{'login_shell'} = "/bin/bash";

 

$UserInfo{'user_id'} = 0;

 

$UserInfo{'group_id'} = 500;

 

 

$users[$i++] = $UserInfo;

 

 

$soapResponse = $soap->create_user(

 

SOAP::Data->name(

 

'users' => @users

 

)

 

);

 

 

I can see in my logs that iControl receives the call. However no user is created. My tcpdump is not showing the XML i expected as well (no user name, etc)

 

 

Some helpful hints would be more then welcome

 

 

Cheers

 

 

Marcel

12 Replies

  • Quick question - what is the significance of "user_id" and "group_id" ? Is there documentation that I could search for quesitons like these as opposed to asking in the forums, so I don't have to bug you guys?
  • Luke,

     

     

    If you are unfamiliar with UNIX/Linux: user_id and group_id are UNIX-specific identifiers as the F5 host system is Linux-based, BUT, the please do read the note on create_user method in v10.1 SDK:

     

     

    Note: this method is deprecated; please use create_user_3 and associated data. (home directory, user id, and group id are now computed by the system) Note: as of v10.1.0, this method will silently ignore any of user id, group id, and home directory passed in.

     

     

    i.e. you don't have to worry about user_id/group_id and home_directory anymore if you are running version 10.1+

     

     

    Sam