Description
SUMMARY
For some reason, one of my hosts (a domain controller) is producing this warning during facts gathering:
[WARNING]: Error during machine sid retrieval: An error (1788) occurred while enumerating the group membership. The member's SID could not be resolved.
I was able to reproduce this error by manually executing the code
ansible.windows/plugins/modules/setup.ps1
Lines 847 to 857 in f1f2bcb
and then trying to list $group.Members
.
$adminGroup
contains the string BUILTIN\Administratoren
.
However, I am unable to see the members of this group, since the affected server is a domain controller, and has no local groups.
get-localgroup $adminGroup
returns get-localgroup : Group BUILTIN\Administratoren was not found.
.
Is there any way I can fix this / list the members of this group so I can see which one is causing issues?
ISSUE TYPE
- Bug Report
COMPONENT NAME
setup
ANSIBLE VERSION
ansible [core 2.16.3]
config file = /builds/ansible/deployments/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /app/lib/python3.12/site-packages/ansible
ansible collection location = /builds/ansible/deployments/vendor_collections
executable location = /app/bin//ansible
python version = 3.12.2 (main, Feb 7 2024, 22:13:24) [GCC 13.2.1 20231014] (/usr/local/bin/python)
jinja version = 3.1.3
libyaml = True
COLLECTION VERSION
Collection Version
--------------- -------
ansible.windows 1.14.0
CONFIGURATION
CACHE_PLUGIN_CONNECTION(/home/yannik/projects/xxx/ansible/ansible.cfg) = .ansible_facts
CACHE_PLUGIN_TIMEOUT(/home/yannik/projects/xxx/ansible/ansible.cfg) = 60
CALLBACKS_ENABLED(/home/yannik/projects/xxx/ansible/ansible.cfg) = ['ansible.posix.profile_tasks']
COLLECTIONS_PATHS(/home/yannik/projects/xxx/ansible/ansible.cfg) = ['/home/yannik/projects/xxx/ansible/vendor_collections']
CONFIG_FILE() = /home/yannik/projects/xxx/ansible/ansible.cfg
DEFAULT_FORKS(/home/yannik/projects/xxx/ansible/ansible.cfg) = 25
DEFAULT_HOST_LIST(/home/yannik/projects/xxx/ansible/ansible.cfg) = ['/home/yannik/projects/xxx/ansible/inventory']
DEFAULT_MANAGED_STR(/home/yannik/projects/xxx/ansible/ansible.cfg) = This file is managed by ansible and will be overwritten! Do not change it manually!
DEFAULT_ROLES_PATH(/home/yannik/projects/xxx/ansible/ansible.cfg) = ['/home/yannik/projects/xxx/ansible/vendor_roles']
DEFAULT_STDOUT_CALLBACK(/home/yannik/projects/xxx/ansible/ansible.cfg) = yaml
DEFAULT_TIMEOUT(/home/yannik/projects/xxx/ansible/ansible.cfg) = 120
DIFF_ALWAYS(/home/yannik/projects/xxx/ansible/ansible.cfg) = True
EDITOR(env: EDITOR) = vim
HOST_KEY_CHECKING(/home/yannik/projects/xxx/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/home/yannik/projects/xxx/ansible/ansible.cfg) = auto_silent
PAGER(env: PAGER) = less
RETRY_FILES_ENABLED(/home/yannik/projects/xxx/ansible/ansible.cfg) = False
OS / ENVIRONMENT
Target OS: windows server 2022