How to confirm an user logged in is a remote user?

How do I confirm if a user logged in, is remote or local? In the case if the user is remote, how to be sure what authentication/method is it using, like LDAP, NIS or other?

What is your definition of remote and local? In terms of IP addresses, or some other meaning?
Also, confirming from where? What is your role on that particular server, root, perhaps?

Depending on your desired usage, you can use 'finger' or even the lightweight version 'pinky' for showing the "From where" field.
If it's SSH session, look for env. variables called SSH_CLIENT or SSH_CONNECTION. Alternatively, you can grep the respective OS log files (/var/log/messages) for a combination of user's login and specific strings.

actually theres a user "abc123". Its not listed in /etc/passwd. so i wanted to know it gets authenticated to login to this machine.
Thanks'

---------- Post updated 08-05-11 at 03:18 PM ---------- Previous update was 08-04-11 at 06:41 PM ----------

I tried to diable nis in etc/nsswitch.conf, the user could not login.
I uncomemnted the nis option for passwd. the user can login.
Hence we can conclude that the user needed NIS to login.
thanks anyways