- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to trace script running bu root
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
Forums
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
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
тАО05-22-2008 05:02 AM
тАО05-22-2008 05:02 AM
I give sudo authorization for one script to some users. (This script is executed by sudo as root).
Example: sudo /su22/script/myscript.sh
For the moment users can modify this script and could introduce a forbiden command.
It's impossible for me to avoid this.
How to obtain a trace of all sub commands called inside this script.
Thanks for any propositions
Regards
Den
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 05:07 AM
тАО05-22-2008 05:07 AM
Solutiontusc can do it.
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.9/
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/trace-1.6/
The former is much more modern.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 05:10 AM
тАО05-22-2008 05:10 AM
Re: How to trace script running bu root
Regards Den
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 05:13 AM
тАО05-22-2008 05:13 AM
Re: How to trace script running bu root
Try truss on AIX.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 05:23 AM
тАО05-22-2008 05:23 AM
Re: How to trace script running bu root
(I have something like "diff" in mind ...)
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 05:24 AM
тАО05-22-2008 05:24 AM
Re: How to trace script running bu root
read the script is not good the user can change it, run and roll back to the previsous version...
Regards
Den
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 05:31 AM
тАО05-22-2008 05:31 AM
Re: How to trace script running bu root
IMHO even if you log the actions to a file somewhere, if somebody really want to do anything, he can also delete these entries from the logs, because (via the script) he is still root ...
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 06:27 AM
тАО05-22-2008 06:27 AM
Re: How to trace script running bu root
>>It's impossible for me to avoid this.
Why is that? If you have given access via sudo, then permissions for the script should be set to -r-x------ (500) with root as the owner I see no reason that users should be able to modify this script, unless there is something you're not telling us.
Anything you do in this script could potentially be changed by users, so the point is really moot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 08:16 AM
тАО05-22-2008 08:16 AM
Re: How to trace script running bu root
;-) Of course it's possible to do this but i can't because this script is altered by Oracle fix pack installation. My Problem is that i can accept Oracle modification but i need to avoid all personal root commands hidden in the myscript.sh !
Regards
Den
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2008 11:46 AM
тАО05-22-2008 11:46 AM
Re: How to trace script running bu root
If it is, you are lost.
The user can easily prepare a modified shell, add another root user ... everything, because he is root. If you have no idea, you can't know what to looking for.
Trust your users - that's it.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2008 05:06 AM
тАО07-07-2008 05:06 AM
Re: How to trace script running bu root
just one sugestion:
- U can make a small script, that check the if the script was modif. in the last zxz minutes, and if yes then copy (I mean replace) the modif. one with your original one - and of course, create yourself a log, to check it when U have time;
- create your own policy to use this script, and the rest is history, I think...
eddy