who, w and company


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting who, w and company
# 1  
Old 04-09-2010
who, w and company

What are some of the ways to get valid who data?

There's who and w but I have cases where we login as mailadmin or dbadmin and I want to trace those logins back as far as possible. We have mixed access to the env. Some use VPN client, some use ssh to a single host and then login to other internal hosts from there. Does anyone know of a tracewho or something like that?

How are you solving this problem? We could enforce that each user has to login as themselves(less desirable) or we could do other things at login.

We don't use nfs or an auth system, just separate /etc/passwd on each host.

Ideas/thoughts/suggestions?
# 2  
Old 04-09-2010
The wtmpx (utmpx is also the file on some systems) file has login history. You can use last or a custom written c tool to find what you need.
Code:
last -100 joe_user

These files keep data from the last reboot on. Any user who logs in is usually recorded.

man wtmpx
man last
and maybe man utmpx
# 3  
Old 04-10-2010
I think I did a lousy job explaining what I'm after. An example goes a long way I think.

hostz: dbadm is logged in from hosty
hosty: dbadm, mailadm, root, bob, jan, berndt, jose are logged in from various hosts

dbadm on hosty has logged into hostz as dbadm from hosty and is logged into hosty from
hostx

hostx: has dbadm, svnadm, aturing, ehubble, rfeynman

svnadm on hostx is logged into hosty as dbadm then to hostz as dbadm

...and so on and so forth

I want to be able to follow the trail as far as is possible and am wondering if a tool already
exists to do this. Maybe this is the wrong place to post this.
# 4  
Old 04-10-2010
Use 'finger', and then add something to the .profile to log this information into a common history file.
With an ssh connection the $SSH_CONNECTION environment variable shows the connection trail.
# 5  
Old 04-10-2010
Quote:
Originally Posted by jgt
Use 'finger'
Good ole' finger, forgot about that. I will try that. I found in some cases $SSH_CONNECTION was empty. Maybe a csh or solaris issue.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to convert ip to DSL provider company name?

Hello, I am not sure this question is totally related to scripting. What I want to do is to match ip addresses with DSL provider company. It should extract ip addresses from log file (which is no problem) and ask the script to search each ip in regional internet registries source webpage.... (5 Replies)
Discussion started by: baris35
5 Replies

2. Red Hat

mail not working with company id

Hi, I have a fresh new installation of red hat linux. I am trying to send an email from the "mail" utility from inside my Linux box to my company id "xxx@company.com". We are using microsoft exchange server online version to host our company's email. I am able to send emails to gmail and... (2 Replies)
Discussion started by: priya33184
2 Replies

3. IP Networking

Bypassing My Company Firewall!

Hi! My organization has put a Firewall which eat up a lot of important data access. So I came to know about SSH Tunneling to bypass the Firewall. I will have to setup a free access SSH server to tunnel data access through PUTTY or OpenSSH. The problem is that I don't know about any free... (1 Reply)
Discussion started by: nixhead
1 Replies

4. What is on Your Mind?

What Company Makes Your Mobile Phone?

Without getting into the exact models (which change all the time anyway), who makes your (primary) mobile phone? (35 Replies)
Discussion started by: Neo
35 Replies

5. UNIX for Dummies Questions & Answers

So, like, I signed on with a new hosting company...

... and there was absolutely nothing installed except fedora and ssh. I used yum to install vsftp and httpd, both start and ps shows they're running, and yet I can't connect with either of them. Where on earth or in redhat do I begin looking to unravel this one? I've overseen a server before but... (3 Replies)
Discussion started by: Bobby
3 Replies
Login or Register to Ask a Question