ls /home or
awk -F: '{ print $1 }' /etc/passwd
Or if you want to only get usernames that are actual users (i.e. leave out system made users like nobody, root, ftp, etc), try this:
Code:
awk -F: '$3 >= 1000 && $3 < 10000 { print $3 " " $1 }' /etc/passwd
Note that you'll probably have to modify the number range. In my system, UID's start at 1000 for normal users. $1 corresponds to the column of /etc/passwd containing usernames, $3 is the UID column. Once you figure out the range you need, you can remove the
$3 " " section of the print statement.