Sponsored Content
Special Forums Cybersecurity Help Required: Command to find IP address and command executed of a user Post 302202883 by era on Friday 6th of June 2008 01:52:47 AM
Old 06-06-2008
Do you mean shell commands? The last command can show you when a user logged in and from where. There is no standard facility for recording individual commands, although some audit systems for doing this exist. What to recommend depends somewhat on which platform you are on. If I recall correctly even The GNU Accounting Utilities offer the basic tools for this.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to find the exit status for the last executed command

I am executing a find command in my script i.e find $2 -type f -name '*.gif' -mtime +$1 -exec rm {} \; how do i check that this command is executed properly.. i would lke t trap the errror and display my error message kinly help.. this is an urgent issue. (1 Reply)
Discussion started by: vijay.amirthraj
1 Replies

2. UNIX for Dummies Questions & Answers

Is there a unix command to find ALL hostnames for an ip address?

I am trying to determine if there are several url/host names for an IP address. Is there a UNIX command to find ALL host names for an IP address? Thank you in advance. (3 Replies)
Discussion started by: rukasu
3 Replies

3. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

4. Shell Programming and Scripting

System Command dies even when command gets executed successfully

Hi I have created a perl script & running it using Linux machine. I want my script to die when system command is unsuccessful but script is dying even when system command gets executed successfully. :wall: I am using the command below :- system($cmd) || die "FAILED $!"; print "Hello"; ... (2 Replies)
Discussion started by: Priyanka Gupta
2 Replies

5. AIX

How to find the log for executed command in IBM AIX?

In Unix If we executed any command where will generate the particluar log related to command in Unix. (4 Replies)
Discussion started by: victory
4 Replies

6. Shell Programming and Scripting

Need to echo command successful if command is executed successfully

Hello, I have written a command n shell script : srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f If the above command executes successfully without error I need to echo "Service relocated successfully and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies

7. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

8. SuSE

Find command doesn't pipe the output as required.

Hi, I am using below code snippet to echo/display the files found (matching a pattern from searchstring.out file) and the corresponding owner. while read j do echo "Pattern to search is:- $j" find / -name "*$j*" |\ while read k do echo "File found is:- $k" owner=$(ls... (9 Replies)
Discussion started by: Vipin Batra
9 Replies

9. UNIX for Beginners Questions & Answers

Find Original user who executed the command

Hi Team, Please help me with the below question. SunOS 5.10 Shell: -bash I am trying to find the original user who executed a command on my development server. In my dev server users login using their personal id and sudo to a common id using 'sudo -u commonid -i'. Once logged in as... (6 Replies)
Discussion started by: sam99
6 Replies

10. UNIX for Beginners Questions & Answers

Find heartbeat ip address with cllsif command

hi~~ my Os is 6.1 i want to find heartbeat ip address from below result. i think, is it en7 onto both nodes? /usr/es/sbin/cluster/utilities/cllsif Adapter Type Network Net Type Attribute Node IP Address Hardware Address Interface Name Global Name ... (2 Replies)
Discussion started by: tomato00
2 Replies
acct(5) 							File Formats Manual							   acct(5)

Name
       acct - execution accounting file

Syntax
       #include <sys/acct.h>

Description
       The  system  call makes entries in an accounting file for each process that terminates.	The accounting file is a sequence of entries whose
       layout, as defined by the include file, is:
       typedef u_short comp_t
       struct  acct
       {
	       char    ac_comm[10];   /* Accounting command name */
	       comp_t  ac_utime;      /* Accounting user time */
	       comp_t  ac_stime;      /* Accounting system time */
	       comp_t  ac_etime;      /* Accounting elapsed time */
	       time_t  ac_btime;      /* Beginning time */
	       short   ac_uid;	      /* Accounting user ID */
	       short   ac_gid;	      /* Accounting group ID */
	       short   ac_mem;	      /* average memory usage */
	       comp_t  ac_io;	      /* number of disk IO blocks */
	       dev_t   ac_tty;	      /* control typewriter */
	       char    ac_flag;       /* Accounting flag */
       };

       #define AFORK   0001    /* has executed fork, but no exec */
       #define ASU     0002    /* used super-user privileges */
       #define ACOMPAT 0004    /* used compatibility mode */
       #define ACORE   0010    /* dumped core */
       #define AXSIG   0020    /* killed by a signal */
       #define AHZ     64      /* the accuracy of data is 1/AHZ */

       #ifdef KERNEL
       struct  acct    acctbuf;
       struct  gnode   *acctp;
       #endif
       If the process does an the first 10 characters of the file name appear in ac_comm.  The accounting flag contains  bits  indicating  whether
       was ever accomplished and whether the process ever had superuser privileges.

See Also
       acct(2), execve(2), sa(8)

								       RISC								   acct(5)
All times are GMT -4. The time now is 09:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy