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

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to confirm an user logged in is a remote user?
# 1  
Old 08-04-2011
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?
# 2  
Old 08-04-2011
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.

Last edited by sysgate; 08-04-2011 at 09:20 AM.. Reason: Missed the Red Hat string, editing the post accordingly.
# 3  
Old 08-05-2011
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Logged in windows user name

Hi All, We use putty to connect to a unix box. We want to identify the folks involved in running certain shell scripts on the server. I want to identify the windows user id of those folks who have logged through Putty to run the scripts.As unix-id is shared by more than two folks, tracking... (3 Replies)
Discussion started by: mdkareemuddin
3 Replies

2. Shell Programming and Scripting

Last user logged in

hi! How can I find into: /var/log/messages.4 /var/log/messages.3 /var/log/messages.2 /var/log/messages.1 /var/log/messages The last user do a login? (for example user1) My idea is to search by the pattern "Accepted password for" buy I necessary search into all files first and in the... (2 Replies)
Discussion started by: guif
2 Replies

3. Shell Programming and Scripting

Does running a cron job of a user require the user to be logged in?

Suppose user 'asdf' is not logged into server 'bbbb', but the server is up. User 'asdf' has cron job. Will it be executed? (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

4. Shell Programming and Scripting

User Logged In The Most - Bash

Hi, first time poster, newbie to Bash. I'm looking to get the username of the user who's been logged into a computer the most / longest. I am new to Bash but am familiar with other scripting languages, mainly PHP. So I have a general idea about how to go about the script logic, but don't know... (13 Replies)
Discussion started by: Panman82
13 Replies

5. Programming

Check if user logged into remote machine via C++ / Java

Hi, I have a program running on HP-UX and it must checkwhether a user has already logged-in to another machine. The hostname of the other machine is known when the check has to be made. Is there a way which this can be accomplished using C++ or Java? If not I could parse the output of a... (6 Replies)
Discussion started by: johnmmcparland
6 Replies

6. UNIX for Advanced & Expert Users

currenlty logged in user on remote computer

Hello everyone Does anyone know, if there is a command that tells you who is logged in on remote host? I'm ssh-ing as root to the remote host and then run whoami but that doesn't tells me who is logged in that particular computer instead shows my remote login. Is there a way to do that?... (2 Replies)
Discussion started by: goude
2 Replies

7. UNIX for Advanced & Expert Users

Send email as a different user than the user logged in

Hi I am using mailx to send email and am wondering if there is a way I can send the email from a different user than the user logged in. something like do-not-reply@xyz.com Thank you. (1 Reply)
Discussion started by: rakeshou
1 Replies

8. Shell Programming and Scripting

script on user who logged in????

writing a script that will check every 5 seconds whether a particular user has logged into the system # Determine if someone is logged on # Version 4.0 if then echo “ Incorrect number of arguments” echo “Usage: $ ison4 <user>” else user=“$1” if who | grep “$user” > /dev/null then... (2 Replies)
Discussion started by: kim187
2 Replies

9. Shell Programming and Scripting

user logged on?

Hi, What commands do i need to check if a user is logged on to the network? thanks. (1 Reply)
Discussion started by: provo
1 Replies

10. UNIX for Dummies Questions & Answers

Is user logged on??

How can i check to see if a user is logged on to the network? (1 Reply)
Discussion started by: provo
1 Replies
Login or Register to Ask a Question