Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to get a su report on Unix? Post 302438848 by iga3725 on Wednesday 21st of July 2010 02:59:34 AM
Old 07-21-2010
Hi

I think is not a good idea to use any "profile" files because they only get read when users make 'su -' and no t 'su' command. I already have a script which mantain su lastlogin on a file, but now I want to make another script to show me only older su's from N days. This script gives this output:
Code:
acoxxx Lastlogin="2010/07/20 13:10"
db2t Lastlogin="2010/07/21 03:30"
db2tadm Lastlogin="2010/07/20 18:23"
eisuser Lastlogin="2010/07/20 17:26"
israel Lastlogin="2010/07/20 11:42"
nmon Lastlogin="2010/07/21 03:50"
norbac Lastlogin="2010/07/20 14:21"
oracle Lastlogin="2010/07/20 20:05"
root Lastlogin="2010/07/20 18:44"
s03josa0 Lastlogin="2010/07/20 14:10"

Here you have su lastlogin (it takes it from /var/adm/sulog). Do you have any idea how to 'grep' ONLY lines older than N days from the date given in this output?

If you want I could show the script.

Thanks
 

9 More Discussions You Might Find Interesting

1. HP-UX

Unix sheel script to run report

Hi All, I have a report which I am running from unix shell script using CONCSUB utility. Just for testing I put the order number in shell script as ord_low and ord_high. But Actually what is going to happen is that the order numbers will be in a file say a.txt and this CONCSUB should... (0 Replies)
Discussion started by: isingh786
0 Replies

2. Shell Programming and Scripting

need help on unix script to run report

Hi All, I have a report which I am running from unix shell script using CONCSUB utility. Just for testing I put the order number in shell script as ord_low and ord_high. But Actually what is going to happen is that the order numbers will be in a file say a.txt and this CONCSUB... (2 Replies)
Discussion started by: isingh786
2 Replies

3. Shell Programming and Scripting

unix report

hello i just want to ask one question i am willing to create health check of my disk in unix. like a script should automatically run and genrate output in unix in beautiful report format. so is there is any way to create a beautiful report in unix like heading should be bold and big in font and... (2 Replies)
Discussion started by: shary
2 Replies

4. Shell Programming and Scripting

sql plus report under unix environment

Hi i am creating a report with file format csv using sql plus commands under unix environment. I am sending this report using mailx command to excel spread sheet. when i opened the report my columns are merged. I need to manually pull each column to see whole column results. Is there any way in... (0 Replies)
Discussion started by: raosurya
0 Replies

5. Shell Programming and Scripting

AutoFilter in Excel report when exporting from Unix

Hi All, Is it possible to have AutoFilter applied in the Excel Sheet which is Exported from UNix server as *.csv file. (0 Replies)
Discussion started by: rawat_me01
0 Replies

6. Homework & Coursework Questions

Report on Javascript attacks on Unix

1. The problem statement, all variables and given/known data: Prepare a report discussing from an administration and security perspective, role and function of a JavaScript within a UNIX network. You should illustrate your answer with practical examples. In particular attention should me paid to... (1 Reply)
Discussion started by: afdesignz
1 Replies

7. Shell Programming and Scripting

Script to report database home in unix

Hello: I am trying to build a ksh shell script which would summarize space occupied by "product" directory under /u*/app/oracle and summarize and report the total size occupied by it in one server. Environment is this... HP UNIX 11i Korn Shell some thing like ... (1 Reply)
Discussion started by: Sam1974
1 Replies

8. Shell Programming and Scripting

How can i make a report from some insert in UNIX shell?

I have some insert in my unix shell script. This every insert has a spool (a file with datas) and a sql file with the query. I have to create a report file with three columns: The first(TAB_NAME) will contains the name of the table in wich has been done the insert, the second (STATE) will... (7 Replies)
Discussion started by: punticci
7 Replies

9. UNIX for Dummies Questions & Answers

SQL Report from UNIX

I am trying to write a shell script which dynamically reads all the .sql (oracle sql files) from a particular directory and generates a .csv file in the target directory. I have started first with the below sample script to see if it is working but I am not able to get it executed, please help... (7 Replies)
Discussion started by: mora
7 Replies
IPTABLES-APPLY(8)                                                 iptables 1.6.1                                                 IPTABLES-APPLY(8)

NAME
iptables-apply - a safer way to update iptables remotely SYNOPSIS
iptables-apply [-hV] [-t timeout] [-w savefile] {[rulesfile]|-c [runcmd]} DESCRIPTION
iptables-apply will try to apply a new rulesfile (as output by iptables-save, read by iptables-restore) or run a command to configure iptables and then prompt the user whether the changes are okay. If the new iptables rules cut the existing connection, the user will not be able to answer affirmatively. In this case, the script rolls back to the previous working iptables rules after the timeout expires. Successfully applied rules can also be written to savefile and later used to roll back to this state. This can be used to implement a store last good configuration mechanism when experimenting with an iptables setup script: iptables-apply -w /etc/network/iptables.up.rules -c /etc/network/iptables.up.run When called as ip6tables-apply, the script will use ip6tables-save/-restore and IPv6 default values instead. Default value for rulesfile is '/etc/network/iptables.up.rules'. OPTIONS
-t seconds, --timeout seconds Sets the timeout in seconds after which the script will roll back to the previous ruleset (default: 10). -w savefile, --write savefile Specify the savefile where successfully applied rules will be written to (default if empty string is given: /etc/network/iptables.up.rules). -c runcmd, --command runcmd Run command runcmd to configure iptables instead of applying a rulesfile (default: /etc/network/iptables.up.run). -h, --help Display usage information. -V, --version Display version information. SEE ALSO
iptables-restore(8), iptables-save(8), iptables(8). LEGALESE
Original iptables-apply - Copyright 2006 Martin F. Krafft <madduck@madduck.net>. Version 1.1 - Copyright 2010 GW <gw.2010@tnode.com or http://gw.tnode.com/>. This manual page was written by Martin F. Krafft <madduck@madduck.net> and extended by GW <gw.2010@tnode.com or http://gw.tnode.com/>. Permission is granted to copy, distribute and/or modify this document under the terms of the Artistic License 2.0. iptables 1.6.1 IPTABLES-APPLY(8)
All times are GMT -4. The time now is 04:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy