How to access all user history file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to access all user history file
# 1  
Old 05-22-2009
How to access all user history file

Team ,

using fc command we can get details of our history file .. Is it possible to get the same result for different user from root.. Actually I need to collect all the stuff from select users history file for day to day basis.


thanks in advance ..
# 2  
Old 05-22-2009
Big brother ... Smilie

Yes it'll be called '.sh_history' or '.kshrc_history' or '.bash_history' (depending on the user's shell) in the top-level of each user's home directory. Try:

Code:
ls /home/*/*.history

# 3  
Old 05-22-2009
big "bother" squared - we are SOX compliant.

If your shell honors $HISTFILE you can create a history file anywhere you want during login
We have ours like this
Code:
/home/[somewhere]/.ihist/.sh_hist_jmcnama

All of the interactive users' histories are there in the same .ihist directory. We set HISTSIZE=1000 to keep track for a while. This allows an easy scan of history to find out "whodunit" if there is a security problem.

This is a SOX requirement - be able to look up all interactives users commands for the past 30 days. We have accounting turned on too.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Granting access to specific user on a 700 file

Hello, I have a a directory dir1 with permissions 700 (yes wantedly) and is owned by user1:group1 rwx------ user1 group1 dir1I need to give permissions to user2 (belongs to group2) on dir1 and its files, so I granted the permissions using setfacl ; instead of adding the user to groups and... (3 Replies)
Discussion started by: karumudi7
3 Replies

2. Shell Programming and Scripting

History of all the users in single file with command , date . time , ip and user

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

3. Shell Programming and Scripting

History of all the users in single file with command , date . time , ip and user

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

4. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

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

5. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

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

6. Cybersecurity

File owned by oracle user and dba group need readonly access to other users

Under oracle user file abc.txt was created. Oracle user belong to dba group on UNIX Server. However other non Oracle users which belongs to some other network groups need read only access to this file. Every time when I login as other then oracle user and try to view this file it saying that I... (2 Replies)
Discussion started by: groosha
2 Replies

7. Shell Programming and Scripting

access user history as root

Hi, I need to access a user's command history. However, the dilemma is that he is logged in and so his current history is not yet flushed to .bash_history file which gets flushed when he logs out. Is there a way I can still access his most recent history? thank you, S (4 Replies)
Discussion started by: sardare
4 Replies

8. UNIX for Dummies Questions & Answers

User History

How do I pipe serveral commans that will list only the user ids, sort the output, and remove any duplice name entries for those that have logged in in the past month? Thanks! (1 Reply)
Discussion started by: CasperQuiet
1 Replies

9. UNIX for Advanced & Expert Users

How to delete history for a particular user

Hi All, Whenever I log in to my terminal and execute some cmds and then I type "history", I get the list of all the commands that I have executed. I want to know where is the history been stored (any path location ?) Secondly,if I want to delete the history or some part of the history, can... (9 Replies)
Discussion started by: shubhranshu
9 Replies
Login or Register to Ask a Question