Forum Discussion
Marcel_Kuiper_5
Nimbostratus
Jun 22, 2007Adding 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
- Luke_Lehman
Employee
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? - samstep
Cirrocumulus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects