I have this weird situation: On a Centos 6.6 box, in my
sshd_config, I have the line
AllowGroups foo bar baz
just 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 see
May 17 16:27:03 myserver sshd: User baz from other.server.com not allowed because none of user's groups are listed in AllowGroups
And 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 up
this group (also, users within the group bar can login with
Also, the (seemingly) exact setup works on other hosts. The configuration is deployed via puppet, so it really should be identical.
Edit as requested below, the output of
root@foobar:/etc/ssh $ groups baz baz : nburoot
exepcted 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.