File: UserDirectory.rst

package info (click to toggle)
python-pyvmomi 6.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,980 kB
  • sloc: python: 9,206; xml: 77; makefile: 9
file content (102 lines) | stat: -rw-r--r-- 4,536 bytes parent folder | download | duplicates (6)
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
.. _str: https://docs.python.org/2/library/stdtypes.html

.. _bool: https://docs.python.org/2/library/stdtypes.html

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

.. _UserSearchResult: ../vim/UserSearchResult.rst

.. _vim.fault.NotFound: ../vim/fault/NotFound.rst

.. _vim.UserSearchResult: ../vim/UserSearchResult.rst

.. _vmodl.fault.NotSupported: ../vmodl/fault/NotSupported.rst


vim.UserDirectory
=================
  The `UserDirectory`_ managed object provides information about users and groups on a vSphere server and ESX hosts. The method `RetrieveUserGroups`_ returns a list of user account data. The method can perform a search operation based on specific criteria - user name, group name, sub-string or string matching, and, on Windows, domain. Use the results as input to the AuthorizationManager methods `SetEntityPermissions`_ and `ResetEntityPermissions`_ .The content of the returned results depends on the server environment:
   * On a Windows host,
   * `RetrieveUserGroups`_
   * can search from the set of trusted domains on the host, including the primary domain of the system. A special domain (specified as an empty string -
   * ) refers to the users and groups local to the host.
   * On an ESX Server or a Linux host, the search operates on the users and groups defined in the /etc/passwd file. Always specify an empty string (
   * ) for the domain argument. If the /etc/passwd file contains Sun NIS or NIS+ users and groups, RetrieveUserGroups returns information about these accounts as well.
   * 




Attributes
----------
    domainList ([`str`_]):
      privilege: System.View
       List of Windows domains available for user searches, if the underlying system supports windows domain membership.


Methods
-------


RetrieveUserGroups(domain, searchStr, belongsToGroup, belongsToUser, exactMatch, findUsers, findGroups):
   Returns a list of `UserSearchResult`_ objects describing the users and groups defined for the server.
    * On Windows, the search for users and groups is restricted to the given domain. If you omit the domain argument, then the search is performed on local users and groups.
    * On ESX Server (or Linux systems), the method returns the list of users and groups that are specified in the /etc/passwd file. If the password file contains Sun NIS or NIS+ users and groups, the returned list includes information about those as well.
    * 
    * You must hold the Authorization.ModifyPermissions privilege to invoke this method. If you hold the privilege on any ManagedEntity, you will have access to user and group information for the server.
    * 
    * As of vSphere API 5.1:
    * Local user groups on ESXi are not supported and this method will not return information about local groups on the ESXi host. Information about Active Directory groups is not affected.
    * Some special system users on ESXi like 'nfsnobody' and 'daemon' will be filtered out by this method.
    * 


  Privilege:
               dynamic



  Args:
    domain (`str`_, optional):
       Domain to be searched. If not set, then the method searches the local machine.


    searchStr (`str`_):
       Case insensitive substring used to filter results; the search string is compared to the login and full name for users, and the name and description for groups. Leave this blank to match all users.


    belongsToGroup (`str`_, optional):
       If present, the returned list contains only users or groups that directly belong to the specified group. Users or groups that have indirect membership will not be included in the list.


    belongsToUser (`str`_, optional):
       If present, the returned list contains only groups that directly contain the specified user. Groups that indirectly contain the user will not be included in the list.


    exactMatch (`bool`_):
       Indicates the searchStr passed should match a user or group name exactly.


    findUsers (`bool`_):
       True, if users should be included in the result.


    findGroups (`bool`_):
       True, if groups should be included in the result.




  Returns:
    [`vim.UserSearchResult`_]:
         

  Raises:

    `vim.fault.NotFound`_: 
       If any of the domain, belongsToGroup, or belongsToUser arguments refer to entities that do not exist.

    `vmodl.fault.NotSupported`_: 
       If you specify a domain for systems that do not support domains, such as an ESX Server. The method also throws NotSupported if you specify membership (belongsToGroup or belongsToUser) and the server does not support by-membership queries.