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
The following error is thrown when attempting to enforce optional group membership for a group which does not have a unique GID.
[ERROR ] These values could not be changed: {'groups': ['adm', 'audio', 'cdrom', 'dialout', 'dip', 'floppy', 'netdev', 'plugdev', 'sudo', 'user', 'users', 'video']}
local:
----------
ID: groups_manage_user
Function: user.present
Name: debian
Result: False
Comment: These values could not be changed: {'groups': ['adm', 'audio', 'cdrom', 'dialout', 'dip', 'floppy', 'netdev', 'plugdev', 'sudo', 'user', 'users', 'video']}
Started: 14:57:44.820074
Duration: 39.273 ms
Changes:
Summary for local
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 39.273 ms
Add the user group with a duplicate GID, such as copying the users group line in /etc/group and then run the state.
salt-call state.apply groups
Running in TRACE log level points toward the problem:
TRACE ] Trying os.getgrouplist for 'debian'
[TRACE ] Group list for user 'debian': ['adm', 'audio', 'cdrom', 'debian', 'dialout', 'dip', 'floppy', 'netdev', 'plugdev', 'sudo', 'users', 'video']
The group listing is derived from GIDs, so the user group is not shown.
Expected behavior
While not the best practice, duplicate GIDs are a valid configuration which might be experienced on systems. The function should be able to list unique group names which might have duplicate GIDs.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 3005+0na.b18281eDependency Versions:
cffi: Not Installedcherrypy: Not Installeddateutil: Not Installeddocker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.2libgit2: Not InstalledM2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.3msgpack-pure: Not Installedmysql-python: Not Installedpycparser: Not Installedpycrypto: 2.6.1pycryptodome: 3.14.1pygit2: Not InstalledPython: 3.7.3 (default, Jan 22 2021, 20:04:44)python-gnupg: Not InstalledPyYAML: 6.0PyZMQ: 23.0.0smmap: Not Installedtimelib: Not InstalledTornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: debian 10 busterlocale: UTF-8machine: x86_64release: 4.19.0-21-amd64system: Linuxversion: Debian GNU/Linux 10 buster
The text was updated successfully, but these errors were encountered:
Description
The following error is thrown when attempting to enforce optional group membership for a group which does not have a unique GID.
Setup
Example state file:
Steps to Reproduce the behavior
Add the
user
group with a duplicate GID, such as copying theusers
group line in/etc/group
and then run the state.Running in
TRACE
log level points toward the problem:The group listing is derived from GIDs, so the
user
group is not shown.Expected behavior
While not the best practice, duplicate GIDs are a valid configuration which might be experienced on systems. The function should be able to list unique group names which might have duplicate GIDs.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)The text was updated successfully, but these errors were encountered: