Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Find Original user who executed the command Post 303009838 by pradeep84in on Wednesday 20th of December 2017 11:06:57 PM
Old 12-21-2017
Hi Sam,

Might be below can help you a bit.
  1. Identify the long running process and get the start time of that by using "ps"
  2. Get the output of the user logged in by using "last" command and identify the users who all was logged in during that particular time from the login duration

Last edited by rbatte1; 12-21-2017 at 09:39 AM.. Reason: Converted text lists to formatted lists with LIST=1 tags
 

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 Advanced & Expert Users

Capturing commands executed by user

Hello Unix Champs, For keeping audit trail, I want to log the commands entered by the normal users, on their terminal into a text file. I tried putting a "script -a username.timestamp.txt" in the user profile file, but script command stops execution when user types exit or presses CTRL+D... (3 Replies)
Discussion started by: bhaven.haria
3 Replies

3. Solaris

I want to know whole day commands executed by particular user

Hi all I want to know the commands executed a by particular user .. for the whole day on my machine. I have checked out with the commad $lastcomm <user> It is throwing an error called: .. /var/adm/pacct: No such file or directory Can u help me in this regard.. Thank U... (3 Replies)
Discussion started by: naree
3 Replies

4. Solaris

whole day commands executed by particular user

Hi all I want to know the commands executed a by particular user .. for the whole day on my machine. I have checked out with the commad $lastcomm <user> It is throwing an error called: .. /var/adm/pacct: No such file or directory Can u help me in this regard.. Thank U Naree (1 Reply)
Discussion started by: naree
1 Replies

5. Cybersecurity

Help Required: Command to find IP address and command executed of a user

Hi, I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this. Thanks Vishwas (2 Replies)
Discussion started by: loggedout
2 Replies

6. Shell Programming and Scripting

Capture the original user

in our environment role ids are created in unix to which user does su. say my individual id is drout and a role is devid. i will login to drout the su - devid password : <nothing > password less role id then i will login to devid. can i write a function and pass it in a script while i... (4 Replies)
Discussion started by: dr46014
4 Replies

7. UNIX for Dummies Questions & Answers

Find last executed timestamp

Hi, on our hp-ux box we have 100s of shell scripts in a bin folder. Now i have to figure out which scripts are not being used at all. The timestamp for these are the ones when they were promoted to this 'bin' folder. Now, how can I find when was the last time each of these scripts were run? I... (2 Replies)
Discussion started by: ysrini
2 Replies

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

9. Shell Programming and Scripting

Find logon user based on executed script proc id

Hi, i have requirement to find logged in user based on process id. i have below scenario. 1. all my users will logon to unix box using ssh from windows system. 2. after successful logon they will sudo to common user. ex. sudo -su edadm lot of users are executing jobs from edadm user and... (2 Replies)
Discussion started by: tmalik79
2 Replies

10. HP-UX

Tracking what commands were executed after sudo to another user

All team members has sudo access to user "batch55". Need to track all the commands used by team members after sudo to "batch55". Using HP-UX and ksh shell in our environment. How can i acheive this? Thanks In Advance. (2 Replies)
Discussion started by: venkatababu
2 Replies
RUSERS(1)						    BSD General Commands Manual 						 RUSERS(1)

NAME
rusers -- who is logged in to machines on local network SYNOPSIS
rusers [-al] [host ...] DESCRIPTION
The rusers command produces output similar to who, but for the list of hosts or all machines on the local network. For each host responding to the rusers query, the hostname with the names of the users currently logged on is printed on each line. The rusers command will wait for one minute to catch late responders. The following options are available: -a Print all machines responding even if no one is currently logged in. -l Print a long format listing. This includes the user name, host name, tty that the user is logged in to, the date and time the user logged in, the amount of time since the user typed on the keyboard, and the remote host they logged in from (if applicable). DIAGNOSTICS
rusers: RPC: Program not registered The rpc.rusersd(8) daemon has not been started on the remote host. rusers: RPC: Timed out A communication error occurred. Either the network is excessively congested, or the rpc.rusersd(8) daemon has terminated on the remote host. rusers: RPC: Port mapper failure - RPC: Timed out The remote host is not running the portmapper (see portmap(8) ), and cannot accomodate any RPC-based services. The host may be down. SEE ALSO
rwho(1) users(1), who(1), portmap(8), rpc.rusersd(8) HISTORY
The rusers command appeared in SunOS. BUGS
The sorting options are not implemented. Linux NetKit (0.17) August 15, 1999 Linux NetKit (0.17)
All times are GMT -4. The time now is 12:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy