Sponsored Content
Top Forums Shell Programming and Scripting Script to find systems logged in with a particular userid Post 302360451 by mehimadri on Friday 9th of October 2009 02:54:20 AM
Old 10-09-2009
Script to find systems logged in with a particular userid

Hello All,

I need to design a script to get all the systems names(IP Addresses) logged in with a particular userid say 'xyz' from different terminals. This is to track the use of the particular userid and take action if it is being misused.
The script would accomplish the following steps:
1. the script should run at all times
2. it should find out who all are logged in with username say 'xyz' with the system names(IP Addresses)
3. it should constantly write that with timestamp to a file
4. after each 24 hours it should send a mail to a email address, say : admin@abc.com with the file as attachment.

Any help will be much appreciated.

Thanks in Advance!!

with warm regards,
Himadri S Mazumder
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find station from where is logged in

for secure access purposes I want to know where somebody logs in working in K shell I have who am i= giving user and terminal =gxb pts/4 Jan 22 15:0 finger user => gives all sessions of user = Login name: gxb Directory: /home/gxb ... (17 Replies)
Discussion started by: ghislain
17 Replies

2. Shell Programming and Scripting

to find the number of users logged in

Hi, can u say to display the number of users that logged before me. thanks (10 Replies)
Discussion started by: shanshine
10 Replies

3. Solaris

how to find who logged in

Hi, How do I find who logged in last 30 days? I have last command command, but is there any option to find only last 30 days? Thanks in advance. (0 Replies)
Discussion started by: mokkan
0 Replies

4. Ubuntu

How can we find out who are all logged out recently?

Hi, I need to find out who are all the users logged out recently or some minutes or some hours ago. :b: (4 Replies)
Discussion started by: balan_mca
4 Replies

5. Shell Programming and Scripting

find top 4 users currently logged on can i use grep

For the first 4 users only that are currently logged in output their effective user id. It's not important the order in which each logged in i just want to have the top 4. Same question as here...... (0 Replies)
Discussion started by: whyatepies
0 Replies

6. UNIX for Dummies Questions & Answers

how to find top 3 users currently logged on

For the first 3 users only that are currently logged in output their effective user id. thank you. (6 Replies)
Discussion started by: whyatepies
6 Replies

7. Shell Programming and Scripting

mapping userid to an email in script

i have about 20 different users submitting a web form that executes a unix script in the background that sets EXECUTIONUSER to their unix id. i would like to use $EXECUTIONUSER to set their email address as EMAILADDR. of course their unix id does not match their email name either. for example: ... (3 Replies)
Discussion started by: crimso
3 Replies

8. UNIX for Dummies Questions & Answers

Find who logged in system apart from myself

Hi, I need to find the users logged in the system beside me. as uname -u gives all the user and uname -um gives the current user on system. How can i get result of uname -u minus uname -um . I want to do it in one line. tried with grep but not successful. (6 Replies)
Discussion started by: kailash19
6 Replies

9. Shell Programming and Scripting

Script Entry to block 9 characters userid

Hi Guys, I have one script which is used to add new user in the system. This is how we add new user in system:- sudo /opt/local/bin/new-user 114 ranivarm "Rani Varma(Libo Technical User)" INC00001111 Where 114:-is the site id ranivarm:- is userid "Rani Varma(Libo Technical User)" :-... (11 Replies)
Discussion started by: manalisharmabe
11 Replies

10. Shell Programming and Scripting

Script to find users not logged in for 90 days

Dear All, I need your help in finding out users not logged in to linux system for more than 90 days. I found a script from our forum i am getting error while using that. from the code i have debugged line by line to see where i am getting the problem. i found out the below line i am getting... (5 Replies)
Discussion started by: Sachinlinux
5 Replies
LMTPTEST(1)						      General Commands Manual						       LMTPTEST(1)

 *

NAME
lmtptest - interactive LMTP test program SYNOPSIS
lmtptest [ -t keyfile ] [ -p port ] [ -m mechanism ] [ -a userid ] [ -u userid ] [ -k num ] [ -l num ] [ -r realm ] [ -f file ] [ -n num ] [ -c ] [ -i ] [ -o option=value ] [ -v ] hostname DESCRIPTION
lmtptest is a utility that allows you to authenticate to a LMTP server and interactively issue commands to it. Once authenticated you may issue any LMTP command by simply typing it in. It is capable of multiple SASL authentication mechanisms and handles encryption layers transparently. This utility is often used for testing the operation of a lmtp server. Also those developing LMTP clients find it useful. OPTIONS
-t keyfile Enable TLS. keyfile contains the TLS public and private keys. Specify "" to negotiate a TLS encryption layer but not use TLS authentication. -p port Port to connect to. If left off this defaults to lmtp as defined in /etc/services. -m mechanism Force lmtptest to use mechanism for authentication. If not specified the strongest authentication mechanism supported by the server is chosen. -a userid Userid to use for authentication; defaults to the current user. This is the userid whose password or credentials will be presented to the server for verification. -u userid Userid to use for authorization; defaults to the current user. This is the userid whose identity will be assumed after authentica- tion. NOTE: This is only used with SASL mechanisms that allow proxying (e.g. PLAIN, DIGEST-MD5). -k num Minimum protection layer required. -l num Maximum protection layer to use (0=none; 1=integrity; etc). For example if you are using the KERBEROS_V4 authentication mechanism specifying 0 will force lmtptest to not use any layer and specifying 1 will force it to use the integrity layer. By default the maximum supported protection layer will be used. -r realm Specify the realm to use. Certain authentication mechanisms (e.g. DIGEST-MD5) may require one to specify the realm. -f file Pipe file into connection after authentication. -n num Number of authentication attempts; default = 1. The client will attempt to do SSL/TLS session reuse and/or fast reauth (e.g. DIGEST-MD5), if possible. -c Enable challenge prompt callbacks. This will cause the OTP mechanism to ask for the the one-time password instead of the secret pass-phrase (library generates the correct response). -i Don't send an initial client response for SASL mechanisms, even if the protocol supports it. -o option=value Set the SASL option to value. -v Verbose. Print out more information than usual. SEE ALSO
lmtpd(8) CMU
Project Cyrus LMTPTEST(1)
All times are GMT -4. The time now is 02:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy