I'm on Ubuntu 24. Originally, the system had an existing group with gid 999:
# cat /etc/group | grep 999
systemd-journal:x:999:
(I mistakenly tried to create a group with that duplicate ID: groupadd docker -g 999
) -
UPDATE: I originally thought I was responsible for creating the duplicate group ID, but after a bunch of troubleshooting, it seems that it was created by the LDAP server. So the prior statement is not correct.
Now I'm stuck unable to add users to the group (properly) and unable to delete the docker group in order to start over.
Firstly, there's no docker group in /etc/group:
# sudo cat /etc/group | grep docker
If I run getent group docker
, then I get the users who are in the original group with gid 999 - those that belong to the systemd-journal group:
# getent group docker
docker:*:999:ausername,anotherusername,yetanotherusername
I can't change its gid:
# sudo groupmod -g 899 docker
groupmod: group 'docker' does not exist in /etc/group
I can't delete the docker group either:
# sudo groupdel docker
groupdel: cannot remove entry 'docker' from /etc/group
I'm also not allowed to create the docker group again:
# sudo groupadd -g 899 docker
groupadd: group 'docker' already exists
If I try to change the group of a file to be the docker, it'll actually assign the original group (systemd-journal) that gid 999 belongs to:
# sudo chown root:docker /tmp/foo
# ls -l /tmp/foo
-rw-r--r-- 1 root systemd-journal 0 Jan 25 03:50 /tmp/foo
The contents of /etc/nsswitch.conf
are:
passwd: files systemd sss
group: files systemd sss
shadow: files systemd sss
gshadow: files systemd
hosts: files dns
networks: files
protocols: db files
services: db files sss
ethers: db files
rpc: db files
netgroup: nis sss
sudoers: files sss
automount: sss
How can I reset things so that I can re-create (or change the gid of) the docker group?
Asked by antun
(111 rep)
Jan 25, 2025, 03:54 AM
Last activity: Jan 27, 2025, 04:14 PM
Last activity: Jan 27, 2025, 04:14 PM