how can distingiush user account

example

root::0:3::/:/sbin/sh
daemon::1:5::/:/sbin/sh
bin:
:2:2::/usr/bin:/sbin/sh
sys::3:3::/:
adm:
:4:4::/var/adm:/sbin/sh
uucp::5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico
lp:
:9:7::/var/spool/lp:/sbin/sh
nuucp::11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico
hpdb:
:27:1:ALLBASE:/:/sbin/sh
puppy::19:3::/:/sbin/sh

how can i distingush usr account and non user account
when i read /etc/passwd file

I only grep user account like example ,root ,puppy

which condition can that i determine these

thanks

Real users usually have home directories in /home and have a real shell. The first test is usually sufficient, although in some systems, FTP and WWW have "home" directories.

This should do the trick:

awk -F: '$6 ~ /home/ && $7 ~ /sh$/' /etc/passwd