- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- script help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2005 01:03 PM
тАО08-16-2005 01:03 PM
Looking a script to do the following:
I'd like to be able to go through the syslog and capture when anyone user does an
su - klxprod.
I'd also like to to be able to put the output of the above SU activity within the the following field format if at all possible, like the following 2 examples.
SU 07/23 22:01 + tty?? root-klxprod
SU 07/20 09:14 + ta jsmith-klxprod John Smith
Can someone please help?
-KPS
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2005 01:10 PM
тАО08-16-2005 01:10 PM
Re: script help
I dont understand why you have to go through the syslog to get the entries of people doing su - where you already have a logfile recording all these
Have a look at /var/adm/sulog file that will have all entries in the format you like.
- Tags:
- sulog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2005 01:33 PM
тАО08-16-2005 01:33 PM
Re: script help
#grep klxprod /var/adm/sulog>/tmp/sulist.txt
the above will give you su information related to the user klxprod.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2005 06:30 PM
тАО08-16-2005 06:30 PM
SolutionChange sulog file permission as,
1. chmod 644 /var/adm/sulog
Change syslog.conf configuration as,
/etc/syslog.conf
*.auth /var/adm/syslog/syslog.log
Restart syslog daemon as,
/sbin/init.d/syslogd stop
/sbin/init.d/syslogd start
In Home Directory of klmprod,
1. vi .profile
(tail -1 /var/adm/sulog
grep 'klmprod' /var/adm/syslog/syslog.conf | tail -1) >> klmprod.log
For every login to klmprod with su login informations from syslog.log and sulog will be stored in klmprod.log file.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2005 07:19 PM
тАО08-16-2005 07:19 PM
Re: script help
more /var/adm/sulog | grep klxprod
Regards, Ernesto.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 12:49 AM
тАО08-17-2005 12:49 AM
Re: script help
We have some ideas however on how we'll proceed and thanks to you all....