I inherited a Debian Server I think the former sysadmin used to manage with webmin. It is standalone, so security groups should be Linux default config, no LDAP or AD intergration or anything advanced like that.

When I run "getent group" I see user accounts that do not exist in "getent passwd." I am fairly confident these are just users that existed but were deleted in the past. Is this normal for those accounts to remain in the groups, and if so is there a easy way to clean this up?


Thanks, Josh

1 Answer 1


The command grpck from the passwd package would take care of cleaning them up, among other things. From its man page:

... verifies the integrity of the groups information. It checks that all entries in /etc/group and /etc/gshadow have the proper format and contain valid data. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.

Checks are made to verify that each entry has:

  • the correct number of fields
  • a unique and valid group name
  • a valid group identifier (/etc/group only)
  • a valid list of members and administrators
  • a corresponding entry in the /etc/gshadow file (respectively /etc/group for the gshadow checks)
  • Sometimes answering y to grpck's questions to fix up issues frustratingly, leaves the system in a state where re-running grpck still shows the same error messages. There is also grpconv, which, in my case, eliminated grpck messages that grpck didn't. (Perhaps this detail inapplicable here, but as the experience was fresh in my memory, it seemed appropriate to make note of grpconv in case it helps the OP.)
    – kbulgrien
    Commented Sep 28, 2020 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .