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
Test::WWW::Declare(3pm) 				User Contributed Perl Documentation				   Test::WWW::Declare(3pm)

NAME
Test::WWW::Declare - declarative testing for your web app SYNOPSIS
use Test::WWW::Declare tests => 3; use Your::Web::App::Test; Your::Web::App::Test->start_server; session 'testuser' => run { flow 'log in and out' => check { flow 'log in' => check { get 'http://localhost/'; fill form 'login' => { username => 'testuser', password => 'drowssap', }; content should contain 'log out'; }; flow 'log out' => check { get 'http://localhost/'; click href 'log out'; }; }; }; DESCRIPTION
Often in web apps, tests are very dependent on the state set up by previous tests. If one test fails (e.g. "follow the link to the admin page") then it's likely there will be many more failures. This module aims to alleviate this problem, as well as provide a nicer interface to Test::WWW::Mechanize. The central idea is that of "flow". Each flow is a sequence of commands ("fill in this form") and assertions ("content should contain 'testuser'"). If any of these commands or assertions fail then the flow is aborted. Only that one failure is reported to the test harness and user. Flows may also contain other flows. If an inner flow fails, then the outer flow fails as well. FLOWS AND SESSIONS
session NAME => run { CODE } Sessions are a way of associating a set of flows with a WWW::Mechanize instance. A session is mostly equivalent with a user interacting with your web app. Within a session, every command ("get", "click link", etc) is operating on that session's WWW::Mechanize instance. You may have multiple sessions in one test file. Two sessions with the same name are in fact the same session. This lets you write code like the following, simplified slightly: session 'first user' => run { get "$URL/give?task=1&victim=other"; session 'other user' => run { get "$URL/tasks"; content should match qr/task 1/; # this is the same session/mech as the outermost 'first user' session 'first user' => run { get "$URL/tasks"; content shouldnt match qr/task 1/; }; }; }; flow NAME => check { CODE } A flow encompasses a single test. As described above, each flow is a sequence of commands, assertions, and other flows. If any of the components of a flow fail, the rest of the flow is aborted and one or more test failures are reported to the test harness. COMMANDS
get URL click button click href follow_link fill form NAME => {FIELD1 => VALUE1, FIELD2 => VALUE2} ASSERTIONS
Every assertion has two parts: a subject and a verb. SUBJECTS content title url VERBS should(nt) (caselessly) match REGEX should(nt) (caselessly) contain STRING should(nt) (caselessly) lack STRING should(nt) (caselessly) equal STRING SUBCLASSING
One of the goals of this module is to let you subclass it to provide extra features, such as automatically logging in a user each time a session is created. CAVEATS
If you fail any tests, then the actual number of tests run may be fewer than you have in your file. This is because when a flow fails, it immediately aborts the rest of its body (which may include other flows). So if you're setting the number of tests based on how many ran, make sure that all tests passed. BUGS
Hopefully few. We'd like to know about any of them. Please report them to "bug-test-www-declare@rt.cpan.org". SEE ALSO
Test::WWW::Mechanize, Jifty. MAINTAINER
Shawn M Moore "<sartak@bestpractical.com>" ORIGINAL AUTHOR
Jesse Vincent "<jesse@bestpractical.com>" COPYRIGHT
Copyright 2007-2008 Best Practical Solutions, LLC This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2008-10-12 Test::WWW::Declare(3pm)
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy