Logging User Sessions


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Logging User Sessions
# 1  
Old 07-07-2011
Question Logging User Sessions

Hello,

I am using a Linux server (Ubuntu 11.04 Server) to host some files and a code repository. Because we are using ssh + svn to connect to the repository, our users have normal ssh access.

What I would like to do is log their user sessions so that I have an audit trail in the event that something breaks or disappears. I looked into the "script" command, but what I do not like is that users must have write access to these files. I want to be able to ensure that the users have not tampered with their logs.

Is there to log to a file that the users can't touch? I thought about some kind of daemon, or executing script as another user.
# 2  
Old 07-08-2011
Easiest way I can come up with: have the logs written to a separate directory, where the users have only write access (no read, no execute bit set), and use non-predictable names for the logs. That way they can't see the file, unless they know the specific name (which should be hard to deduct).

As long as your users don't figure out how to use ps to get the filename, this should be enough. If they do, you'll have to call script using a C program as wrapper, hiding the command line.
# 3  
Old 07-08-2011
Hmm.. Thanks. I like that idea.

I got the file working correctly, but I can't seem to get the script command to execute without exposing the path name.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Find number of ACTIVE SSH putty sessions, excluding where the user hopped on to a diff server

Hi - If iam logged on to server A, on 4 putty windows using SSH ... and out of these 4 logged-in sessions, in one of the sessions if i did SSH from server A to server B; i would now have 4 putty windows sessions ... of which 3 are actively logged on to Server A while 1 putty window is actively... (2 Replies)
Discussion started by: i4ismail
2 Replies

2. Shell Programming and Scripting

User Logging

Hi, I have several engineers logging into servers with the same system username and passwords eg root. I was thinking about adding a script to bashrc where a user is forced upon login to enter their name and once that has executed there history is logged/redirected to a log file somewhere. I... (10 Replies)
Discussion started by: maxwellhouse
10 Replies

3. Shell Programming and Scripting

Ending user sessions which have been on a program for longer than 1 hour

hi, im looking to write a script to end user sessions which are on a paticular program and have been for over an hour so I can free up the system a bit. I understand that the "who" command lists the current users logged into the system, however it does not let me see what program they are on... (12 Replies)
Discussion started by: 02JayJay02
12 Replies

4. UNIX for Dummies Questions & Answers

User account logging

Hi - I want to log commands typed by oraapps user with time into some log file on runtime. HISTTIMEFORMAT="%d/%m/%y %T " works but any one with oraapps user can delete the history. OS : RHEl 5.6 Any help is appreciated. (5 Replies)
Discussion started by: oraclermanpt
5 Replies

5. Solaris

Logging remote telnet sessions via script

Hi, My requirement - for security purpose - I want all root logins to my solaris servers are done by a script kept in a separate unix box. This script will telnet into remote solaris server with root user and log every session via log file. Now my purpose is to log every telnet session... (3 Replies)
Discussion started by: rahul_jain250
3 Replies

6. Solaris

Logging Telnet sessions ?

hello guys, Does anybody know how I can log all the telnet sessions for a specific IP. For instance, anybody who make a telnet to IP x.x.x.x this session will be logged. the purpose of it is that I need to know every command that people are running on this node. Any help ? Thanks. (1 Reply)
Discussion started by: cerioni
1 Replies

7. UNIX for Dummies Questions & Answers

Automatic logging (capture screen output) of telnet/ssh sessions on a Solaris node

Hi I am working in Solaris 10 and I want to monitor logs for every telnet/ssh session that tries to connect to the server. I need these logs to be generated in a file that I can fetch using ftp. I am a new user and a stepwise detail will be great BR saGGee (3 Replies)
Discussion started by: saggee
3 Replies

8. AIX

Logging user logins

I want to know how I can turn off and turn on login logging. We have a server that appears to have stopped logging user logins. Running the who command shows nothing and the last command shows no logins for a month. The var/adm/wtmp file isn't full and there is plenty of space in the var file... (2 Replies)
Discussion started by: daveisme
2 Replies

9. UNIX for Advanced & Expert Users

Max sessions a single user can've on Solaris server at the same time

There's a user that opens various login sessions with a particular SOLARIS server at the same time - this locks the server thats tried to get logged into.. Kindly help on how to know the max limit of sessions a particular user can open with a particular server at the same time. AND, how to... (2 Replies)
Discussion started by: its.simron
2 Replies

10. Solaris

Logging Telnet Sessions

I am trying to find the following information regarding the logging of telnet sessions within a Solaris 10 environment: (1) How can I tell if the logging of telnet sessions is enabled on a Solaris 10 machine? (2) Assuming that the logging of telnet sessions is not enabled, what is the... (1 Reply)
Discussion started by: RobSand
1 Replies
Login or Register to Ask a Question