Solved

Is it possible to know who is loging on from where?

Posted on 1997-11-19
6
246 Views
Last Modified: 2013-12-06
Hi, I wonder if we can know from where a certain user
log into my machine. Is this infomation in lastlog,
utmp and wtmp?
Thanks.


0
Comment
Question by:xzhang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 5

Accepted Solution

by:
n0thing earned 30 total points
ID: 2007885
Hi,

   Just use the "lastlog" command or "lastlog user" to know
where that user came from.
    Yes ... the information is stored in wtmp & utmp.

Minh Lai
0
 

Expert Comment

by:xilef
ID: 2007886
On most systems, the command is "last".

If you want to see who is _currently_ on the system, use the "who" command (the information for this is in the utmp file, see "man utmp").


0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007887
UNIX commands have 2 (or 3) characters ;-))
this one exceptionally just 1:
   w
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:xzhang
ID: 2007888
Thanks a lot. But I have one more question about utmp and
wtmp. Can we access other people's command history from
utmp and wtmp? Using ps is not capable to capture those
soon finish command, you know.
0
 

Expert Comment

by:zhangz
ID: 2007889
On HP-UX system, You can not access other people's command
history file "~/.sh_history" unless you have super-user's
permission.
0
 

Expert Comment

by:zhangz
ID: 2007890
On HP-UX system, You can not access other people's command
history file "~/.sh_history" unless you have super-user's
permission. I am not sure whether there are similar file
on other UNIX platforms.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question