Summary:
Adds a new user to a server.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
The new user information. |
|
|
|
|
This element, together with the |
|
|
|
|
|
|
|
Specifies whether a home directory should be created for the user. Possible values:
If the parameter is omitted, the decision whether to create a directory or not will be made automatically based on the OS template used (some OS templates imply the creation of home directories while others don't). If the parameter is included, the default template behaviour is ignored. |
|
|
|
Some Linux distributions will create the initial group with the same name as the user name by default. Other distributions will add a new user to a predefined group. You can use this field, together with the |
|
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
|
The new user information. |
Example:
Adding a new user named "TestUser" to the specified server. The Server ID is specified using the dst
element of the packet header. Also creating an initial group named "InitGroup" and adding the user to it. The user ID will be selected from the range 100-200.
Input
<packet version="4.0.0">
<dst>
<host>9bafbeb7-85f7-499e-a210-40e00850a5f3</host>
</dst>
<target>userm</target>
<data>
<userm>
<add_user>
<user>
<initial_group>
<name>InitGroup</name>
</initial_group>
<name>TestUser</name>
<shell>/bin/bash</shell>
</user>
<min_uid>100</min_uid>
<max_uid>200</max_uid>
<create_initial_group/>
</add_user>
</userm>
</data>
</packet>
Output
<ns1:packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/userm" xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="0" id="1dc45eee46at4db7rdfc" time="2007-03-07T11:53:52+0000" priority="0" version="4.0.0">
<ns1:origin>9bafbeb7-85f7-499e-a210-40e00850a5f3</ns1:origin>
<ns1:dst>
<director>gend</director>
<target>vzclient3</target>
</ns1:dst>
<ns1:data>
<ns2:userm>
<ns2:user xsi:type="ns3:userType">
<ns3:uid>101</ns3:uid>
<ns3:name>TestUser</ns3:name>
<ns3:initial_group>
<ns3:gid>500</ns3:gid>
<ns3:name>InitGroup</ns3:name>
</ns3:initial_group>
<ns3:shell>/bin/bash</ns3:shell>
<ns3:home_dir>/home/TestUser</ns3:home_dir>
</ns2:user>
</ns2:userm>
</ns1:data>
<ns1:src>
<ns1:director>vpsd</ns1:director>
<ns1:target>userm</ns1:target>
</ns1:src>
<ns1:target>vzclient3</ns1:target>
</ns1:packet>