Solved

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

Posted on 1997-11-19
6
245 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
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Title # Comments Views Activity
NTP Server in VMware 5 465
Solaris 4.1.3 cloning and booting 13 95
Retreiving column names in Windows but not in Unix 11 93
capture vmstat info and insert it into an oracle table 31 93
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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
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.
Suggested Courses

734 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