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

[BUG] [win] group.adduser fails to add certain built-in Windows groups #63667

Closed
3 of 9 tasks
dafyddj opened this issue Feb 8, 2023 · 2 comments
Closed
3 of 9 tasks
Assignees
Labels
Bug broken, incorrect, or confusing behavior Chlorine v3007.0 Execution-Module Windows

Comments

@dafyddj
Copy link
Contributor

dafyddj commented Feb 8, 2023

Description
group.adduser fails to add certain built-in Windows groups, namely Everyone and CREATOR OWNER.

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Tried on fresh installs of Windows 8.1 Pro and Windows 10 Pro in Virtualbox VMs and on physical machines.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior

PS C:\Users\vagrant> salt-call group.adduser "Remote Desktop Users" Everyone
C:\Program Files\Salt Project\Salt\bin\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools i
acing distutils.
  warnings.warn("Setuptools is replacing distutils.")
[ERROR   ] Failed to add \Everyone to group Remote Desktop Users. An invalid directory pathname was passed

local:
    False

or

PS C:\Users\vagrant> salt-call group.adduser "Remote Desktop Users" "\Everyone"
C:\Program Files\Salt Project\Salt\bin\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools i
acing distutils.
  warnings.warn("Setuptools is replacing distutils.")
[ERROR   ] Failed to add \Everyone to group Remote Desktop Users. An invalid directory pathname was passed

local:
    False

Expected behavior
I would expect the built-in group to be added to the group, as happens using the GUI e.g. lusrmgr.msc
The following is the result after manually adding Everyone to Remote Desktop Users

PS C:\Users\vagrant> salt-call group.info "Remote Desktop Users"
C:\Program Files\Salt Project\Salt\bin\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools i
acing distutils.
  warnings.warn("Setuptools is replacing distutils.")
local:
    ----------
    gid:
        None
    members:
        - Everyone
    name:
        Remote Desktop Users
    passwd:
        None

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3005.1

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.7
     gitpython: 3.1.30
        Jinja2: 3.1.0
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: 1.1.4
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.10.1
        pygit2: Not Installed
        Python: 3.8.16 (tags/v3.8.16:1e3d2d5, Jan  6 2023, 17:39:57) [MSC v.1929 64 bit (AMD64)]
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 22.0.3
         smmap: 4.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist:
        locale: cp1252
       machine: AMD64
       release: 8.1
        system: Windows
       version: 8.1 6.3.9600 SP0 Multiprocessor Free

Additional context

@dafyddj dafyddj added Bug broken, incorrect, or confusing behavior needs-triage labels Feb 8, 2023
@twangboy twangboy self-assigned this Feb 8, 2023
@twangboy twangboy added this to the Chlorine v3007.0 milestone Feb 8, 2023
@twangboy
Copy link
Contributor

twangboy commented Feb 8, 2023

We need to figure out how to add these groups and document it, or fix the execution module so these groups can be added.

@twangboy
Copy link
Contributor

twangboy commented Mar 6, 2024

The above PR should fix this issue.

@twangboy twangboy closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Chlorine v3007.0 Execution-Module Windows
Projects
None yet
Development

No branches or pull requests

2 participants