Readable passwords in logs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Readable passwords in logs
# 1  
Old 01-31-2013
Readable passwords in logs

I'm looking for two scripts, can anyone help me on this.

The first one to scan log files in /xxxx/xxxx/xxxx/USERLOGS and /xxxx/xxxxx/xxx/xxx/xxx/Logs and list out all files and the offending lines that have a readable password.

Check the accuracy of the script to see if it is missing lines with unmasked passwords or returning lines that have masked passwords.
grep "password=" * | egrep -v "XXXXXXXX|password=[\" ]*&"

Appreciate your help.
# 2  
Old 01-31-2013
Are you searching for a specific password or any password= ? What is masked in this milieu?
# 3  
Old 01-31-2013
Any passwords.
# 4  
Old 01-31-2013
So, there are many strings to compare? How many?
# 5  
Old 01-31-2013
Many strings and it may be numeric and characters.
# 6  
Old 01-31-2013
Well, we can egrep 'aaa|bbb|ccc|...|zzz' for all of them, but it will be a long command line and might run slow. Exposed, too. We could egrep in parallel, though. You can do it as lines in sed in a file -- no exposure.
Code:
#!/usr/bin/sed -f
/\<aaa\>/b
/\<bbb\>/b
 .
 .
 .
/\<zzz\>/b
d

In sed d is delete and 'b nothing' is branch to end of script is print and next.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. Solaris

Storage Array not readable

Hi We have an array connected to the machine but when i issue format command i dont see it. But the array is up and running and there are no warning lights. Is there a way to find that array from the OK boot prompt? Please advise. Thanks (9 Replies)
Discussion started by: prash358
9 Replies

3. UNIX for Advanced & Expert Users

When did UNIX start using encrypted passwords, and not displaying passwords when you type them in?

I've been using various versions of UNIX and Linux since 1993, and I've never run across one that showed your password as you type it in when you log in, or one that stored passwords in plain text rather than encrypted. I'm writing a script for work for a security audit, and two of the... (5 Replies)
Discussion started by: Anne Neville
5 Replies

4. UNIX for Dummies Questions & Answers

help in extracting logs in readable format

hello everyone. newbie here in unix. I am trying to extract the logs of a certain job and would like to output it in a readable format, see below the CAT part: cat /var/opt/ctma/ctm/sysout/idwesct_sh30_eng_r6_cdcs_sh.LOG_05l0du_000* | egrep -i 'orderid:|file_name=' | sed... (1 Reply)
Discussion started by: eanne_may
1 Replies

5. Shell Programming and Scripting

check if file is readable by others

hi all, in ksh script how do i detect if a file is readable by others ?? thanks. (6 Replies)
Discussion started by: cesarNZ
6 Replies

6. Shell Programming and Scripting

Delete not readable characters

Hi All, I wanted to delete all the unwanted characters in the string. ie, to delete all the characters which are not alpha numeric values. var1="a./bc" var2='abc/\."123' like to get the output as print var1 abc print var2 abc123 Could you guys help me out pls. Your help is... (3 Replies)
Discussion started by: ajilesh
3 Replies

7. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

Hi, I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows: """"""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies

8. UNIX for Advanced & Expert Users

readable rdiff output

Hi Experts, I have to display rdiff in a readable format. The rdiff output is as under: Index: ivapp_conf/etc/PrdWest/process.par diff -u ivapp_conf/etc/PrdWest/process.par:1.1.80.1 ivapp_conf/etc/PrdWest/process.par:1.1.80.5 --- ivapp_conf/etc/PrdWest/process.par:1.1.80.1 Wed Apr 9... (4 Replies)
Discussion started by: rakeshou
4 Replies

9. Post Here to Contact Site Administrators and Moderators

To make my post readable again

Dear Moderator, Being fully aware about the duplication , is there anything by which a problem posted not answered for more than a week , how can we make the same readable once again , cause someone may have solution?? I have posted for array printing in hotizontal way , but no reply , so I... (1 Reply)
Discussion started by: vakharia Mahesh
1 Replies
Login or Register to Ask a Question