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