You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Salt-minion fails with "Access is denied" on Windows when run under domain account with specific privileges #52577
Salt-minion can sometimes fail on Windows with error message pywintypes.error: (5, 'NetUserGetLocalGroups' , 'Access is denied.') when executed under domain account with special permissions set up.
We found this issue when we tried to run the service under account in AD in Object List Mode, when the account doesn't have full visibility over the domain. During debugging how the NetUserGetLocalGroups function actually works, we found out it tries to resolve all indirect groups the user is member of and it tries to resolve domain accounts as well, if the user is domain user (see NetUserGetLocalGroups returns ERROR_ACCESS_DENIED for reference). It's because of flag LG_INCLUDE_INDIRECT, which is set by default.
The solution is explicitly disabling the LG_INCLUDE_INDIRECT flag, but it might be sometimes needed, so wrapping the call in try/except with call without the flag would be better.
Setup
Windows server joined to domain.
Steps to Reproduce Issue
Run salt-minion under domain account which doesn't have permissions to all groups it's indirectly member of.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Activity
lukasraska commentedon Apr 17, 2019
I've proposed #52578 to fix this issue.
lukasraska commentedon Apr 18, 2019
#52596 created which targets the 2018.3 branch
s0undt3ch commentedon Apr 18, 2019
/cc @saltstack/team-windows
stale commentedon Jan 8, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.