HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Audit User login; commands executed
Operating System - HP-UX
1828584
Members
2415
Online
109982
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
09-08-2006 12:47 PM
09-08-2006 12:47 PM
Audit User login; commands executed
am looking for some very good suggestions to log activity that occurs
after individual login to UNIX. Scenario:
1. Log all the commands executed by the user after user login into the
UNIX account.
2. Also, if after login user "su" to other login, log all the commands
executed in that "su" login.
What I know is that this could be done by "scripts", but, we don't want
to use scripts because:
1. User can modify the files as it's accessible by him.
2. Also, because it could be easily turned off.
Is there any other better way ? I looked at syslog, sulog etc, but none
of them gives me what I need. sulog just tells who logged in from which
IP.
UNIX being so powerful and profusion of utilities on it would have
something in store that suits my requirement.
after individual login to UNIX. Scenario:
1. Log all the commands executed by the user after user login into the
UNIX account.
2. Also, if after login user "su" to other login, log all the commands
executed in that "su" login.
What I know is that this could be done by "scripts", but, we don't want
to use scripts because:
1. User can modify the files as it's accessible by him.
2. Also, because it could be easily turned off.
Is there any other better way ? I looked at syslog, sulog etc, but none
of them gives me what I need. sulog just tells who logged in from which
IP.
UNIX being so powerful and profusion of utilities on it would have
something in store that suits my requirement.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2006 01:07 PM
09-08-2006 01:07 PM
Re: Audit User login; commands executed
Hi,
The best way to accomplish this is to convert to a trusted system. If this is not possible, make sure that $HISTFILE is set for the user, and than $HISTSIZE is a sufficiently large value.
You may also want to consider a 'sudo' approach to the user's history file so that he/she does not have direct write access to it. Routine archiving of ~user/$HISTFILE would also be a good idea.
'script' or a similar utility (e.g. GNU Screen) would be another option, although these would incur overhead.
PCS
The best way to accomplish this is to convert to a trusted system. If this is not possible, make sure that $HISTFILE is set for the user, and than $HISTSIZE is a sufficiently large value.
You may also want to consider a 'sudo' approach to the user's history file so that he/she does not have direct write access to it. Routine archiving of ~user/$HISTFILE would also be a good idea.
'script' or a similar utility (e.g. GNU Screen) would be another option, although these would incur overhead.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2006 01:24 PM
09-08-2006 01:24 PM
Re: Audit User login; commands executed
First activity can be done when you convert your system to trusted mode. Then you can turn on auditing for the system which logs all activity. But it is not a good idea if you are not going to monitor the logs.
Install sudo package so that you can assign root privilages to users and once user sudo's to root then activity will be logged onto .sh_history.
As spex said above you can set history file to hold all activity.
Install sudo package so that you can assign root privilages to users and once user sudo's to root then activity will be logged onto .sh_history.
As spex said above you can set history file to hold all activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2006 03:09 PM
09-08-2006 03:09 PM
Re: Audit User login; commands executed
As suggested by "Spex", How can I do this:
"You may also want to consider a 'sudo' approach to the user's history file so that he/she does not have direct write access to it. Routine archiving of ~user/$HISTFILE would also be a good idea."
Also what's the overhead of converting it to trusted mode ?
Could acct, acctmon etc. be used ?
"You may also want to consider a 'sudo' approach to the user's history file so that he/she does not have direct write access to it. Routine archiving of ~user/$HISTFILE would also be a good idea."
Also what's the overhead of converting it to trusted mode ?
Could acct, acctmon etc. be used ?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP