Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added deluserfromgroup bof #36

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adoreste
Copy link

No description provided.

{
NET_API_STATUS dwErrorCode = NERR_Success;
LOCALGROUP_MEMBERS_INFO_3 mi[1] = {0}; // https://learn.microsoft.com/en-us/windows/win32/api/lmaccess/ns-lmaccess-localgroup_members_info_3
mi[0].lgrmi3_domainandname = intAlloc(1024);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this memory should be freed using intFree()

return;
}

if (lpswzDomainName == NULL && lpswzHostName != NULL)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the description all of the available arguments are listed as required

If I give both a hostname and a domain name, SUCCESS. will be printed but nothing will happen.

I'd split this into two aliases one to remove a user from a computer local group and one to remove it from a domain group. Then you can enforce this logic in the cna script easily.

barring that the cna shouldn't list everything as required and should explain what is expected for local vs domain group deletion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants