Determining if user is local-user in /etc/passwd or LDAP user

Besides doing some shell-script which loops through /etc/passwd, I was wondering if there was some command that would tell me, like an enhanced version of getent.

The Operating system is Solaris 10 (recent-ish revision) using Sun DS for LDAP.

ldaplist passwd username

will tell if the user is defined in the ldap backend. It doesn't sort out the case where the user is defined in both /etc/passwd and ldap though.

grep '^username' /etc/passwd

Will list that user's line in /etc/passwd. Check nsswitch.conf as well to see where your machine tries to resolve uids from.

That should be:

grep '^username:' /etc/password

/etc/passwd no "word" in passwd....

Ouch, I missed that one, here is the right command:

grep '^username:' /etc/passwd