File: LocalAccountManager.rst

package info (click to toggle)
python-pyvmomi 6.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 14,984 kB
  • sloc: python: 9,206; xml: 77; makefile: 11
file content (247 lines) | stat: -rw-r--r-- 6,009 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
.. _str: https://docs.python.org/2/library/stdtypes.html

.. _vim.Task: ../../vim/Task.rst

.. _vim.fault.UserNotFound: ../../vim/fault/UserNotFound.rst

.. _vim.fault.NoPermission: ../../vim/fault/NoPermission.rst

.. _vim.fault.AlreadyExists: ../../vim/fault/AlreadyExists.rst

.. _vmodl.fault.SecurityError: ../../vmodl/fault/SecurityError.rst

.. _vmodl.fault.InvalidArgument: ../../vmodl/fault/InvalidArgument.rst

.. _HostLocalAccountManagerAccountSpecification: ../../vim/host/LocalAccountManager/AccountSpecification.rst

.. _HostLocalAccountManagerPosixAccountSpecification: ../../vim/host/LocalAccountManager/PosixAccountSpecification.rst

.. _vim.host.LocalAccountManager.AccountSpecification: ../../vim/host/LocalAccountManager/AccountSpecification.rst


vim.host.LocalAccountManager
============================
  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.




Attributes
----------


Methods
-------


CreateUser(user):
   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.


  Privilege:
               Host.Local.ManageUserGroups



  Args:
    user (`vim.host.LocalAccountManager.AccountSpecification`_):
       Specification of user being created.




  Returns:
    None
         

  Raises:

    `vim.fault.AlreadyExists`_: 
       if the specified local user account already exists.

    `vmodl.fault.InvalidArgument`_: 
       if the user name or password has an invalid format.


UpdateUser(user):
   Updates a local user account using the parameters defined in the `HostLocalAccountManagerAccountSpecification`_ data object type.


  Privilege:
               Host.Local.ManageUserGroups



  Args:
    user (`vim.host.LocalAccountManager.AccountSpecification`_):
       Specification of user being updated.




  Returns:
    None
         

  Raises:

    `vim.fault.UserNotFound`_: 
       if user is not found.

    `vim.fault.AlreadyExists`_: 
       if new account specification specifies an existing user's ID.

    `vmodl.fault.InvalidArgument`_: 
       if new password or description has an invalid format.


CreateGroup(group):
   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.


  Privilege:
               Host.Local.ManageUserGroups



  Args:
    group (`vim.host.LocalAccountManager.AccountSpecification`_):
       Specification of group being created.




  Returns:
    None
         

  Raises:

    `vim.fault.AlreadyExists`_: 
       if specified local group already exists.

    `vmodl.fault.InvalidArgument`_: 
       if group name is in invalid format.


RemoveUser(userName):
   Removes a local user account.As of vSphere API 5.1, this operation will first try to remove all permissions associated with the specifed 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.


  Privilege:
               Host.Local.ManageUserGroups



  Args:
    userName (`str`_):
       User ID of the user account being removed.




  Returns:
    None
         

  Raises:

    `vim.fault.UserNotFound`_: 
       if the specified userName does not exist.

    `vmodl.fault.SecurityError`_: 
       if trying to remove the last local user with DCUI access, or if trying to remove the last local user with full administrative privileges, or if the system has encountered an error while trying to remove user's permissions. or if the account cannot be removed due to permission issues.


RemoveGroup(groupName):
   Removes a local group account.


  Privilege:
               Host.Local.ManageUserGroups



  Args:
    groupName (`str`_):
       Group ID of the group account being removed.




  Returns:
    None
         

  Raises:

    `vim.fault.UserNotFound`_: 
       if the specified groupName does not exist.


AssignUserToGroup(user, group):
   Assigns a user to a group.


  Privilege:
               Host.Local.ManageUserGroups



  Args:
    user (`str`_):
       User ID of the account whose group membership is being assigned.


    group (`str`_):
       Destination group account to which the user is being assigned.




  Returns:
    None
         

  Raises:

    `vim.fault.UserNotFound`_: 
       if the specified user or group does not exist.

    `vim.fault.AlreadyExists`_: 
       if the user is already a member of the target group.


UnassignUserFromGroup(user, group):
   Unassigns a user from a group.


  Privilege:
               Host.Local.ManageUserGroups



  Args:
    user (`str`_):
       User being unassigned from group.


    group (`str`_):
       Group from which the user is being removed.




  Returns:
    None
         

  Raises:

    `vim.fault.UserNotFound`_: 
       if the specified user or group does not exist.

    `vim.fault.NoPermission`_: 
       if the group is the only group to which the user belongs.