I have this weird situation: On a Centos 6.6 box, in my sshd_config, I have the lineAllowGroups foo bar bazjust like on all the other servers.However, when user baz (whose group is baz) tries to login on this one server, login is denied,In the logs I seeMay 17 16:27:03 myserver sshd[6172]: User baz from other.server.com not allowed because none of user's groups are listed in AllowGroupsAnd the user cannot login. Of course I have restarted the ssh daemon to make sure the config is picked up.Also, if I completely remove the 'AllowGroups' line from the sshd_config, login works. Now I am wondering why sshd is not picking upthis group (also, users within the group bar can login with AllowGroups active).Also, the (seemingly) exact setup works on other hosts. The configuration is deployed via puppet, so it really should be identical.Any ideas?Edit as requested below, the output of root@foobar:/etc/ssh $ groups bazbaz : nburootexepcted would be baz as group ... so now I need to check why the group is wrong (even though /etc/groups has it right). I will post the solution as an answer.
sshd AllowGroups group not granting access
centos;sshd;openssh