Sponsored Content
Full Discussion: date and userid
Top Forums Shell Programming and Scripting date and userid Post 67690 by gundu on Friday 25th of March 2005 10:53:07 AM
Old 03-25-2005
Quote:
Originally Posted by muthukumar
Can you give sample log file lines ?? And give input how to get the information from that log file?

HTH.
the logfiles are located in /export/home/$ENV/audit/audit4567

audit4567 can be opened with vi, cat or more has lines like:

2005-03-23 16:00:55 SYNIFSSS006003I1 49219 Provisioning Transaction Created by dc6728(USER ID)
2005-03-23 16:00:56 SYNIFSSS006070I1 49219 Provisioning Transaction Description: Provisioning by cd6728: Create, classname=SI
VXVPNAccessPath, name=Site
2005-03-23 16:00:56 SYNIFSSS006006I1 49219 Provisioning Transaction Opened by cd6728
2005-03-23 16:00:56 SYNIFSSS126003I1 49219 Provisioning Transaction 49219 processing with pid 3538 in /netprov/env7/server/lo
g/output/2005-03-22.13:02:42/SYCCSServer_3538.0
2005-03-23 16:01:00 SYNIFSSS006011I1 49219 VPN Access Path: VPN Access Path Created by cd6728
2005-03-23 16:01:01 SYNIFSSS006011I1 49219 Endpoint: Endpoint Created by cd6728
2005-03-23 16:01:01 SYNIFSSS006011I1 49219 IP over ATM Interface: / SBCIS / GSR10 / ATM7/3.10 Created by cd6728
2005-03-23 16:01:02 SYNIFSSS006011I1 49219 ATM: ATM Created by cd6728

I need to take userinput date to match this date and userid to match the userid here and check for the key words like create,modify,update or delete and send an e-mail

Thanks,
Gundu
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

validating userid

What's wrong with this syntax? It's part of my 'if' statement but it doesn't seem to pass and it keeps going to the 'else' part. I thought it says that userid must start with a non-numeric character and is between 6 and 10 characters long (alphanumeric). $userid|grep -Eq '^?\{6,10\}+$' if... (2 Replies)
Discussion started by: giannicello
2 Replies

2. Solaris

locking userid to 1 dir?

Hey guys, I need to set up some userid's on Solaris. These userid's will be used to view log files, so I will make the home dir /var/tmp. Is there anyway to make this the only dir that the id has access to? I know about chmod, and short of going thru every file on the box to make sure there is... (2 Replies)
Discussion started by: amheck
2 Replies

3. UNIX for Advanced & Expert Users

userid

I would like to know the difference between the real user-id and the effective user-id. If user-A runs a program owned by user-B then which is the real user-id and which is the effective user-id ? (1 Reply)
Discussion started by: sundaresh
1 Replies

4. Shell Programming and Scripting

validating the userid and passwd

Hi i need to write a script which perform some action only when an existing and privliged user is running it. It will call another script where user ID and password are required. So in main script before calling another script I need userID and password validation....for that I can check... (0 Replies)
Discussion started by: ashish_uiit
0 Replies

5. Red Hat

userid access only to a particular service

Hi All, How do I make a userid access only a particular service like sftp? My linux is redhat ent 4. Thanks in advance for any advise. (4 Replies)
Discussion started by: itik
4 Replies

6. Red Hat

userid with nothing to do on the os/app

Hi All, I got this userid apache with the same userid and groupid and /sbin/nologin and the /www/a home folder is empty. Can I just delete this userid? How can I investigate if userid have something to do with the application? Thanks for any comment you may add. (1 Reply)
Discussion started by: itik
1 Replies

7. Shell Programming and Scripting

What is the command to get name associated with userid?

Hi, 1#what is the command to get name associated with userid? 2#I am using unix on Mainframes thru OMVS. So any one know to to capture TSO command output to a variable on OMVS environment. I tried with below script, but its not working! #!/bin/ksh output=$(tso whois PA1234) echo... (6 Replies)
Discussion started by: prashant43
6 Replies

8. Solaris

See who is logging in with a userid

Hi all. Quick question. How can I tell if someone is logging in to our unix servers with an application id and not their personal id? Thanks (2 Replies)
Discussion started by: jamie_collins
2 Replies

9. UNIX for Dummies Questions & Answers

userid and pw

questions: a. where can I customized the password of userid in solaris? say I wanted 10digits long, all caps? thanks (4 Replies)
Discussion started by: lhareigh890
4 Replies

10. UNIX for Advanced & Expert Users

new userid with limited access

Hi, I want to create a user using useradd -m test. But my requirement is he should not change his directory from Home directory. How can I restric the user not to change his directory from his home dir? Thanks, Suresh Double Post (0 Replies)
Discussion started by: suresh3566
0 Replies
fwtmp(1M)						  System Administration Commands						 fwtmp(1M)

NAME
fwtmp, wtmpfix - manipulate connect accounting records SYNOPSIS
/usr/lib/acct/fwtmp [-ic] /usr/lib/acct/wtmpfix [file...] DESCRIPTION
fwtmp reads from the standard input and writes to the standard output, converting binary records of the type found in /var/adm/wtmpx to formatted ASCII records. The ASCII version is useful when it is necessary to edit bad records. wtmpfix examines the standard input or named files in utmpx format, corrects the time/date stamps to make the entries consistent, and writes to the standard output. A hyphen (-) can be used in place of file to indicate the standard input. If time/date corrections are not performed, acctcon(1M) will fault when it encounters certain date-change records. Each time the date is set, a pair of date change records are written to /var/adm/wtmpx. The first record is the old date denoted by the string "old time" placed in the line field and the flag OLD_TIME placed in the type field of the utmpx structure. The second record speci- fies the new date and is denoted by the string new time placed in the line field and the flag NEW_TIME placed in the type field. wtmpfix uses these records to synchronize all time stamps in the file. In addition to correcting time/date stamps, wtmpfix will check the validity of the name field to ensure that it consists solely of alphanu- meric characters or spaces. If it encounters a name that is considered invalid, it will change the login name to INVALID and write a diag- nostic to the standard error. In this way, wtmpfix reduces the chance that acctcon will fail when processing connect accounting records. OPTIONS
-ic Denotes that input is in ASCII form, and output is to be written in binary form. FILES
/var/adm/wtmpx history of user access and administration information ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWaccu | +-----------------------------+-----------------------------+ SEE ALSO
acctcom(1), ed(1), acct(1M), acctcms(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), runacct(1M), acct(2), acct.h(3HEAD), utmpx(4), attributes(5) System Administration Guide: Basic Administration SunOS 5.10 22 Feb 1999 fwtmp(1M)
All times are GMT -4. The time now is 09:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy