Enumerate fields for local credentials databases

Easier than grepping the corresponding file is to use getent (get entity) command:

$ getent passwd dmitritelinov
dmitritelinov:x:1000:1000:Dmitri Telinov,,,:/home/dmitritelinov:/bin/bash
$ sudo getent shadow dmitritelinov
dmitritelinov:$6$hash:18417:0:99999:7:::
$ sudo getent group 100
users:x:100:
getent
This command is used to query a database for information about user, group or shadow (hashed password).