{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/33886","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/33886/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/33886/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/33886/events","html_url":"https://github.com/saltstack/salt/issues/33886","id":159310619,"number":33886,"title":"Failed to remove group root","user":{"login":"dereckson","id":135563,"avatar_url":"https://avatars.githubusercontent.com/u/135563?v=3","gravatar_id":"","url":"https://api.github.com/users/dereckson","html_url":"https://github.com/dereckson","followers_url":"https://api.github.com/users/dereckson/followers","following_url":"https://api.github.com/users/dereckson/following{/other_user}","gists_url":"https://api.github.com/users/dereckson/gists{/gist_id}","starred_url":"https://api.github.com/users/dereckson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereckson/subscriptions","organizations_url":"https://api.github.com/users/dereckson/orgs","repos_url":"https://api.github.com/users/dereckson/repos","events_url":"https://api.github.com/users/dereckson/events{/privacy}","received_events_url":"https://api.github.com/users/dereckson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-09T01:18:39Z","updated_at":"2016-06-09T22:49:59Z","closed_at":null,"body":"I can't remove the group `root` (gid 0).\r\n\r\nUse case: remove any root group on Debian machines to add a `wheel` group instead, like on other  OSes.\r\n\r\n### Setup\r\n\r\n### Steps to Reproduce Issue\r\n\r\n```\r\nroot:\r\n group.absent\r\n```\r\n\r\n### Result\r\n\r\n#### Expected result\r\nThe group to be deleted.\r\n\r\n#### Actual result\r\n\r\n```\r\n----------\r\n          ID: root\r\n    Function: group.absent\r\n      Result: False\r\n     Comment: Failed to remove group root\r\n     Started: 01:10:16.591840\r\n    Duration: 49.116 ms\r\n     Changes:   \r\n----------\r\n```\r\n\r\n### Versions Report\r\n\r\n#### Minion\r\n\r\nSalt Version:\r\n           Salt: 2016.3.0\r\n \r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: 2.4.2\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.7\r\n   mysql-python: 1.3.7\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.11+ (default, Jun  2 2016, 19:34:15)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 15.1.0\r\n           RAET: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.5\r\n \r\nSystem Versions:\r\n           dist: debian stretch/sid \r\n        machine: armv7l\r\n        release: 4.1.6-249\r\n         system: Linux\r\n        version: debian stretch/sid \r\n\r\n#### Master\r\n\r\nSalt Version:\r\n           Salt: 2016.3.0\r\n \r\nDependency Versions:\r\n           cffi: 1.2.1\r\n       cherrypy: Not Installed\r\n       dateutil: 2.5.0\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8\r\n        libgit2: 0.24.0\r\n        libnacl: Not Installed\r\n       M2Crypto: 0.24.0\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.7\r\n   mysql-python: 1.2.5\r\n      pycparser: 2.10\r\n       pycrypto: 2.6.1\r\n         pygit2: 0.24.0\r\n         Python: 2.7.11 (default, Jun  5 2016, 01:18:51)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 15.2.0\r\n           RAET: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n        Tornado: 4.3\r\n            ZMQ: 4.1.4\r\n \r\nSystem Versions:\r\n           dist:   \r\n        machine: amd64\r\n        release: 10.1-RELEASE-p26\r\n         system: FreeBSD\r\n        version: Not Installed\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/225049881","html_url":"https://github.com/saltstack/salt/issues/33886#issuecomment-225049881","issue_url":"https://api.github.com/repos/saltstack/salt/issues/33886","id":225049881,"user":{"login":"Ch3LL","id":6886822,"avatar_url":"https://avatars.githubusercontent.com/u/6886822?v=3","gravatar_id":"","url":"https://api.github.com/users/Ch3LL","html_url":"https://github.com/Ch3LL","followers_url":"https://api.github.com/users/Ch3LL/followers","following_url":"https://api.github.com/users/Ch3LL/following{/other_user}","gists_url":"https://api.github.com/users/Ch3LL/gists{/gist_id}","starred_url":"https://api.github.com/users/Ch3LL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ch3LL/subscriptions","organizations_url":"https://api.github.com/users/Ch3LL/orgs","repos_url":"https://api.github.com/users/Ch3LL/repos","events_url":"https://api.github.com/users/Ch3LL/events{/privacy}","received_events_url":"https://api.github.com/users/Ch3LL/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T22:49:59Z","updated_at":"2016-06-09T22:49:59Z","body":"@dereckson Im guessing if you look in your debug logs you would see something similar to the following:\r\n\r\n```\r\n[INFO    ] Executing command '('groupdel', 'root')' in directory '/root'\r\n[ERROR   ] Command '('groupdel', 'root')' failed with return code: 8\r\n[ERROR   ] stderr: groupdel: cannot remove the primary group of user 'root'\r\n[ERROR   ] retcode: 8\r\n```\r\n\r\nIf you look at the man pages for groupdel it states the following:\r\n\r\n> You may not remove the primary group of any existing user. You must remove the user before you remove the group.\r\n\r\nSo it seems you have to remove the user before removing the group. Not sure if you would really want to remove the root user though."}}
{"actor":{"display_login":"Ch3LL"}}