man groups:
NAME
groups - print the groups a user is in
SYNOPSIS
groups [OPTION]... [USERNAME]...
DESCRIPTION
Print group memberships for each USERNAME or, if no USERNAME is specified,
for the current process (which may differ if the groups database has changed).
То есть команда показывает в каких группах состоит пользователь, а не наоборот, о чём вам и сообщает:
‘example’: no such user
Состав групп можно посмотреть в файле /etc/group или командой
groupmems -g $GROUP -l
.