Solved

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

Posted on 1997-11-19
6
244 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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

679 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