# Managed Object - HostLocalAccountManager(vim.host.LocalAccountManager)

Property of
  HostConfigManager, ServiceContent
See also
  HostAccountSpec
Since
  2.0

## Managed Object Description

This managed object type provides an interface through which local accounts on a host are managed. Note that this managed object applies only to applications that use a local account database on the host to provide authentication (ESX Server, for example). POSIX and win32 hosts may impose different restrictions on the password, ID, and description formats. POSIX host implementation may restrict the user or group name to be lower case letters and less than 16 characters in total. It may also disallow characters such as ";", "\n", and so on. In short, all the platform dependent rules and restrictions regarding naming of users/groups and password apply here. An InvalidArgument fault is thrown if any of these rules are not obeyed.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
AssignUserToGroup, ChangePassword, CreateGroup, CreateUser, RemoveGroup, RemoveUser, UnassignUserFromGroup, UpdateUser

# AssignUserToGroup(assignUserToGroup)

Deprecated. As of vSphere API 5.1, local user groups are not supported and group specific methods will throw NotSupported.

Assigns a user to a group.

Required Privileges
  Host.Local.ManageUserGroups

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
user P | xsd:string | User ID of the account whose group membership is being assigned. Since 2.0
group P | xsd:string | Destination group account to which the user is being assigned. Since 2.0

PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
AlreadyExists | Thrown if the user is already a member of the target group.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
UserNotFound | Thrown if the specified user or group does not exist.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="AssignUserToGroup" type="vsan:AssignUserToGroupRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="AssignUserToGroupResponse"> <complexType/> </element>

# ChangePassword(changePassword)

Updates the password of a local user account.

Required Privileges
  System.Anonymous
Since
  vSphere API 6.7.2

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
user P | xsd:string | the user whose password will be changed. Since vSphere API 6.7.2
oldPassword P | xsd:string | the user's current (old) password. Since vSphere API 6.7.2
newPassword P | xsd:string | the user's new password. Since vSphere API 6.7.2

PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
InvalidLogin | Thrown if the user and oldPassword combination is not valid.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ChangePassword" type="vsan:ChangePasswordRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ChangePasswordResponse"> <complexType/> </element>

# CreateGroup(createGroup)

Deprecated. As of vSphere API 5.1, local user groups are not supported and group specific methods will throw NotSupported.

Creates a local group account using the parameters defined in the HostLocalAccountManagerAccountSpecification data object type. For POSIX hosts, passing the HostLocalAccountManagerPosixAccountSpecification data object type allows you to control the group ID format of the group account being created.

Required Privileges
  Host.Local.ManageUserGroups

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
group P | HostAccountSpec | Specification of group being created. Since 2.0

P Required privilege: group

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
AlreadyExists | Thrown if specified local group already exists.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateGroup" type="vsan:CreateGroupRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateGroupResponse"> <complexType/> </element>

# CreateUser(createUser)

Creates a local user account using the parameters defined in the HostLocalAccountManagerAccountSpecification data object type. For POSIX hosts, passing HostLocalAccountManagerPosixAccountSpecification data object type allows you to control the format of the user ID of the user account being created.

Required Privileges
  Host.Local.ManageUserGroups

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
user P | HostAccountSpec | Specification of user being created. Since 2.0

P Required privilege: user

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
AlreadyExists | Thrown if the specified local user account already exists.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateUser" type="vsan:CreateUserRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateUserResponse"> <complexType/> </element>

# RemoveGroup(removeGroup)

Deprecated. As of vSphere API 5.1, local user groups are not supported and group specific methods will throw NotSupported.

Removes a local group account.

Required Privileges
  Host.Local.ManageUserGroups

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
groupName P | xsd:string | Group ID of the group account being removed. Since 2.0

P Required privilege: groupName

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
UserNotFound | Thrown if the specified groupName does not exist.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="RemoveGroup" type="vsan:RemoveGroupRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="RemoveGroupResponse"> <complexType/> </element>

# RemoveUser(removeUser)

Removes a local user account.

As of vSphere API 5.1, this operation will first try to remove all permissions associated with the specified account. The permissions of the user are removed one by one, not atomically, and the operation is not rolled back if the removal of some permission fails.

Required Privileges
  Host.Local.ManageUserGroups

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
userName P | xsd:string | User ID of the user account being removed. Since 2.0

P Required privilege: userName

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
UserNotFound | Thrown if the specified userName does not exist.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="RemoveUser" type="vsan:RemoveUserRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="RemoveUserResponse"> <complexType/> </element>

# UnassignUserFromGroup(unassignUserFromGroup)

Deprecated. As of vSphere API 5.1, local user groups are not supported and group specific methods will throw NotSupported.

Unassigns a user from a group.

Required Privileges
  Host.Local.ManageUserGroups

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
user P | xsd:string | User being unassigned from group. Since 2.0
group P | xsd:string | Group from which the user is being removed. Since 2.0

PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
UserNotFound | Thrown if the specified user or group does not exist.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UnassignUserFromGroup" type="vsan:UnassignUserFromGroupRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UnassignUserFromGroupResponse"> <complexType/> </element>

# UpdateUser(updateUser)

Updates a local user account using the parameters defined in the HostLocalAccountManagerAccountSpecification data object type.

Required Privileges
  Host.Local.ManageUserGroups

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostLocalAccountManager used to make the method call.
user P | HostAccountSpec | Specification of user being updated. Since 2.0

P Required privilege: user

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
AlreadyExists | Thrown if new account specification specifies an existing user's ID.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
UserNotFound | Thrown if user is not found.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UpdateUser" type="vsan:UpdateUserRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="UpdateUserResponse"> <complexType/> </element>