08-25-2009
We'll set aside the usual rant that should incur for the sake of getting to the useful bit right away, just just take it as given that I don't approve of shared accounts for an initial connection to a server
Give the users their own personal login, then grant them rights to switch to the user they all use for the various activities they need to do - that way you have an ID associated with each session.
Then, to get more detail than just "user blah became root at timeX" you could turn on Solaris Auditing (aka BSM).
Without that, about the best you can do is see which IP address was connected during the time the command you are attempting to trace occurred. That's often insufficient if there are a lot of users on.
10 More Discussions You Might Find Interesting
1. Solaris
how can i identifying whose are logged in last few days,time and date also want. what i will do for get that information (2 Replies)
Discussion started by: sijocg
2 Replies
2. UNIX for Advanced & Expert Users
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies
3. UNIX for Dummies Questions & Answers
Can anyone tell this:
If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used.
Thanks in advance for your help.
Iamnew2solaris (1 Reply)
Discussion started by: iamnew2solaris
1 Replies
4. Shell Programming and Scripting
Is it possible to find out the history of recently typed in commands of a particular user in a multi user system?
the history command expects a numeric argument with it. is it possible to find out the history o commands of a particular user say John_smith for example? (2 Replies)
Discussion started by: arindamlive
2 Replies
5. UNIX for Dummies Questions & Answers
Hi I'm new to Shell scripting .Can anyone please help me how to capture user's login and logout details and load them into a table...
we are using Oracle DB on UNIX:confused: (3 Replies)
Discussion started by: rajmohan146
3 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies
7. Shell Programming and Scripting
HTML Code
archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (2 Replies)
Discussion started by: rehantayyab82
2 Replies
8. Shell Programming and Scripting
HTML Code:
archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (0 Replies)
Discussion started by: rehantayyab82
0 Replies
9. Shell Programming and Scripting
I'm wishing to create a log myself where I wish to:
1.Write a script in /bin folder to make a separate log in var/log folder &
2.Call the script in bashrc each time a user logs in, I'm trying to avoid CRONJOB as it would take too much of my memory after iterations. So I just need to append the... (2 Replies)
Discussion started by: Lionking93
2 Replies
10. UNIX for Advanced & Expert Users
hi, i have an AIX6.1 machine and i modified a user's profile so that it creates history file for each ip address that connects with this user. the reason i did this is because more than 1 person connects with the same user so i want to keep track of command run by all of them. therefore, in the... (5 Replies)
Discussion started by: omonoiatis9
5 Replies
LEARN ABOUT FREEBSD
lastlogin
LASTLOGIN(8) BSD System Manager's Manual LASTLOGIN(8)
NAME
lastlogin -- indicate last login time of users
SYNOPSIS
lastlogin [-f file] [-rt] [user ...]
DESCRIPTION
The lastlogin utility will list the last login session of each specified user, or for all users by default. Each line of output contains the
user name, the tty from which the session was conducted, any hostname, and the start time for the session.
If more than one user is given, the session information for each user is printed in the order given on the command line. Otherwise, informa-
tion for all users is printed. By default, the entries are sorted by user name.
The lastlogin utility differs from last(1) in that it only prints information regarding the very last login session. The last login database
is never turned over or deleted in standard usage.
The following options are available:
-f file
Open last login database file instead of the system-wide database.
-r Print the entries in reverse sorted order.
-t Sort the elements by last login time, instead of user name.
FILES
/var/log/utx.lastlogin last login database
SEE ALSO
last(1), getutxent(3), ac(8)
AUTHORS
John M. Vinopal wrote this program in January 1996 and contributed it to the NetBSD project.
BSD
June 6, 2011 BSD