Solved

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

Posted on 1997-11-19
6
238 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
6 Comments
 
LVL 5

Accepted Solution

by:
n0thing earned 30 total points
Comment Utility
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
Comment Utility
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
Comment Utility
UNIX commands have 2 (or 3) characters ;-))
this one exceptionally just 1:
   w
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:xzhang
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now