Tracking All session history in one file

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Tracking All session history in one file
# 1  
Old 02-21-2013
Tracking All session history in one file

Dear All,

I want to keep all the session history in one file,please help me out to configure so.

Here is the test scenario-

Suppose i have three client A,B and C tries to log in to one Server XA there session specific command and Clint IPADDRESS should get logged in one file...like .bash_history or any other file if there.


I tried simple implementation but it didn't work....I don't have much idea about linux please help me out to configure so.

I tried below procedure..

HOSTTIMEFORMAT="%d/%m/%y %t $SSH_CLIENT"

When i set above environment variable it formats the output of "history" command.

$SSH_CLIENT will track client specific IP ADDRESS



Thanks and Regards
Monoj
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX -Tracking File I/O

Hi Team, I have a requirement. We are processing 100s of thousands of files and had to tar 10K files each The problem I face is, I would need to add the file into tar only when the write operation in the file is complete. How would I achieve this. OS : Sun Solaris 5.8 Shell : KSH ... (7 Replies)
Discussion started by: mr_manii
7 Replies

2. Programming

DB2 - Tracking Table history

HI team Is it possible to track DB2 table on the data insertion,deletion and updates on daily basis . Do we have any inbuilt feature to handle audit analysis ? Any help appreciated (1 Reply)
Discussion started by: Perlbaby
1 Replies

3. UNIX for Advanced & Expert Users

History with Session info

Hello Unix Gurus, I am in the need to capture the terminal info a command was executed from in the history. Currently history lists only the time and command, but does not list the terminal that can help associate the command to an individual. So my ask is - is there a way to capture/append... (3 Replies)
Discussion started by: abby007
3 Replies

4. Shell Programming and Scripting

Tracking users through history command

Hi folks, I have the basic query that there are 3 unix boxes having their individual access now in my team there are 4 members who are using the same credentials to access those 3 boxes through putty ssh from their windows desktop , now if i want to check which 4 members have executed the... (1 Reply)
Discussion started by: punpun66
1 Replies

5. Red Hat

Current Session History

Dear All, I want to display the command related to current session in Redhat Linux 5. Below history command display all the command in ~/.bash_history file. $history My requirement is the command executed in my current session.I mean to say. Suppose after log in as root i executed ... (1 Reply)
Discussion started by: monojcool
1 Replies

6. 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

7. 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

8. UNIX for Dummies Questions & Answers

bash history - each session in different file

Hello How to configure, or where to have each session history in different file Example: someone is connecting as root and at this time is creating file in which we have history of executed command to server is connecting another user and is created another file with command executed by... (1 Reply)
Discussion started by: vikus
1 Replies

9. Shell Programming and Scripting

Script for tracking from directory to file

Hi , I am pretty new to scripting, and I trying to write a script which is not working as I expect to .... I am trying to write a script which starts from top directory and tracks all the folders and sub-folders till it reaches a file and gives the list of files as output for a given... (2 Replies)
Discussion started by: Rahul00000
2 Replies

10. IP Networking

regarding tracking file updates on linux networking environment

could anyone Explain me with how the linux o/s keeps track of file updates in network environment? for example, assume that more than one computer is connected to network (with linux in all of them). if an user say 'X' logged into terminal 1 and created a file with the name of 'temp.txt'. The... (1 Reply)
Discussion started by: pjchoudary
1 Replies
Login or Register to Ask a Question
USER-SESSION-KEYRING(7) 				     Linux Programmer's Manual					   USER-SESSION-KEYRING(7)

NAME
user-session-keyring - per-user default session keyring DESCRIPTION
The user session keyring is a keyring used to anchor keys on behalf of a user. Each UID the kernel deals with has its own user session keyring that is shared by all processes with that UID. The user session keyring has a name (description) of the form _uid_ses.<UID> where <UID> is the user ID of the corresponding user. The user session keyring is associated with the record that the kernel maintains for the UID. It comes into existence upon the first attempt to access either the user session keyring, the user-keyring(7), or the session-keyring(7). The keyring remains pinned in existence so long as there are processes running with that real UID or files opened by those processes remain open. (The keyring can also be pinned indefinitely by linking it into another keyring.) The user session keyring is created on demand when a thread requests it or when a thread asks for its session-keyring(7) and that keyring doesn't exist. In the latter case, a user session keyring will be created and, if the session keyring wasn't to be created, the user ses- sion keyring will be set as the process's actual session keyring. The user session keyring is searched by request_key(2) if the actual session keyring does not exist and is ignored otherwise. A special serial number value, KEY_SPEC_USER_SESSION_KEYRING, is defined that can be used in lieu of the actual serial number of the call- ing process's user session keyring. From the keyctl(1) utility, '@us' can be used instead of a numeric key ID in much the same way. User session keyrings are independent of clone(2), fork(2), vfork(2), execve(2), and _exit(2) excepting that the keyring is destroyed when the UID record is destroyed when the last process pinning it exits. If a user session keyring does not exist when it is accessed, it will be created. Rather than relying on the user session keyring, it is strongly recommended--especially if the process is running as root--that a session- keyring(7) be set explicitly, for example by pam_keyinit(8). NOTES
The user session keyring was added to support situations where a process doesn't have a session keyring, perhaps because it was created via a pathway that didn't involve PAM (e.g., perhaps it was a daemon started by inetd(8)). In such a scenario, the user session keyring acts as a substitute for the session-keyring(7). SEE ALSO
keyctl(1), keyctl(3), keyrings(7), persistent-keyring(7), process-keyring(7), session-keyring(7), thread-keyring(7), user-keyring(7) Linux 2017-03-13 USER-SESSION-KEYRING(7)