Sponsored Content
Top Forums Shell Programming and Scripting Need to track what Commands run in a login session Post 303022508 by hb00 on Sunday 2nd of September 2018 06:00:18 AM
Old 09-02-2018
thanks Scrutinizer for sharing the link. Yes I knew about this Solaris feature but I was more interested to implement in Script form as if got successful then I can go for implementation in Linux as well. Further this tool generate log of logs and it might bring impact on performance and bit complex to fetch the require details My only requirement is that I need what commands user has run in his session.

Thanks RudiC for sharing this idea, could you please explain how can I implement it in term of code at global level further current session commands with time should go to in a file saved with username-with logout time.

Thanks Scrutinizer & RudiC for your idea again and I would appreciate it further if you help in this further creating the script.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

User login session

Having a problem on AIX 4.3.3 with the following error when more than 2 users try and sign onto the server. 3004-312 All available login sessions are in use. ???? (1 Reply)
Discussion started by: Docboyeee
1 Replies

2. UNIX for Dummies Questions & Answers

run commands before login

What would be the best way to setup for a Linux box to run a few commands before the user logs in? (1 Reply)
Discussion started by: woofie
1 Replies

3. Programming

keep track of the last 10 commands the user typed

Can I do it like this? if (strcmp(argv, "history")==0) { argv = "10"; execvp(argc,argv); } actually, it doesn't work, How can I modify it? Thanks (17 Replies)
Discussion started by: zhshqzyc
17 Replies

4. UNIX for Dummies Questions & Answers

Possible to track FTP user last login? Last and Finger don't track them.

Like the topic says, does anyone know if it is possible to check to see when an FTP only user has logged in? Because the shell is /bin/false and they are only using FTP to access the system doing a "finger" or "last" it says they have never logged in. Is there a way to see when ftp users log in... (1 Reply)
Discussion started by: LordJezo
1 Replies

5. Solaris

I am not able to login in gnome session and java session in Sun solaris 9& 10

I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies

6. Shell Programming and Scripting

Record login session...

How to record my login session in a file named session.lst? (1 Reply)
Discussion started by: anupdas
1 Replies

7. UNIX for Advanced & Expert Users

Track user commands

Hi, I have a unix server and I am concerned about the security on that server. I would like to be able to write a script that records all the commands that were typed at the command prompt before the user calls the 'history -c' command and deletes all the history. I was thinking about firing or... (7 Replies)
Discussion started by: mishkamima
7 Replies

8. Shell Programming and Scripting

Determining if session is a login session

Besides 'who am i' and 'tty' what commands could be used to determine if a session is interactive as compared to a web process or cron process. Any command should work with the common unix variants. (3 Replies)
Discussion started by: jgt
3 Replies

9. AIX

track commands run as root after sudo

I'm looking for a way to track commands that are run as root after a user runs sudo su - root. I have a profile set up for root that will track the commands by userid but if we change the shell it only stores it in that shells history file. (2 Replies)
Discussion started by: toor13
2 Replies

10. Solaris

Run automated bash commands from sh login shell

I use plink.exe to automate remote commands that return data to Windows machines. This works well on newer servers running Red Hat since the commands were developed for bash and the designated user's login shell is bash. I need to also support older servers which are running Solaris 10 but the... (5 Replies)
Discussion started by: randman1
5 Replies
Net::HTTPServer::Session(3pm)				User Contributed Perl Documentation			     Net::HTTPServer::Session(3pm)

NAME
Net::HTTPServer::Session - HTTP server side client session SYNOPSIS
Net::HTTPServer::Session handles server side client sessions DESCRIPTION
Net::HTTPServer::Session provides a server side data store for client specific sessions. It uses a cookie stored on the browser to tell the server which session to restore to the user. This is modelled after the PHP session concept. The session is valid for 4 hours from the last time the cookie was sent. EXAMPLES
sub pageHandler { my $request = shift; my $session = $request->Session(); my $response = $request->Response(); # Logout $session->Destroy() if $request->Env("logout"); $response->Print("<html><head><title>Hi there</title></head><body>"); # If the user specified a username on the URL, then save it. if ($request->Env("username")) { $session->Set("username",$request->Env("username")); } # If there is a saved username, then use it. if ($session->Get("username")) { $response->Print("Hello, ",$session->Get("username"),"!"); } else { $response->Print("Hello, stranger!"); } $response->Print("</body></html>"); return $response; } The above would behave as follows: http://server/page - Hello, stranger! http://server/page?username=Bob - Hello, Bob! http://server/page - Hello, Bob! http://server/page?username=Fred - Hello, Fred! http://server/page - Hello, Fred! http://server/page?logout=1 - Hello, stranger! http://server/page - Hello, stranger! METHODS
Delete(var) Delete the specified variable from the session. Destroy() Destroy the session. The server side data is deleted and the cookie will be expired. Exists(var) Returns if the specified variable exists in the sesion. Get(var) Return the value of the specified variable from the session if it exists, undef otherwise. Set(var,value) Store the specified value (scalar or reference to any Perl data structure) in the session. AUTHOR
Ryan Eatmon COPYRIGHT
Copyright (c) 2003-2005 Ryan Eatmon <reatmon@mail.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-03 Net::HTTPServer::Session(3pm)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy