Skip to content

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

@dafyddj

Description

@dafyddj

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions