- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to log down all commands silently?
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
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
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
04-10-2001 11:23 PM
04-10-2001 11:23 PM
How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2001 11:32 PM
04-10-2001 11:32 PM
Re: How to log down all commands silently?
if you are only interested in the commands they fire from the shell prompt you could have a look in their history file ($HOME/.sh_history)
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2001 12:19 AM
04-11-2001 12:19 AM
Re: How to log down all commands silently?
Found the source of a shell program, modify it such that all entered commands will be logged to a file, at last replace login shell of your target users with this modified shell program.
~Philip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2001 04:30 PM
04-11-2001 04:30 PM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2001 12:29 AM
04-12-2001 12:29 AM
Re: How to log down all commands silently?
You could write a false shell for this in that the false shell presents what appears to be a normal prompt, the users command is then piped to a log, actioned - logged and then displayed back to the user.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2001 01:43 AM
04-12-2001 01:43 AM
Re: How to log down all commands silently?
But this wil produce a lot of data in your logfiles. If you do it right and a user opens a big file in vi this whole file will be in your log. And i doubt that this will make the logfiles usefull for you.
So i would suggest using the users historyfile for logging. This will give you a pretty good impression what a user does. To maintain these logfiles on a seperate place how about using tee -f on the users histroy? Doing so you wouldnt miss a single command and the user should not recognize he is beeing watched.
Hope this helps. Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2001 02:25 AM
04-12-2001 02:25 AM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2001 04:26 AM
04-13-2001 04:26 AM
Re: How to log down all commands silently?
or xterm ... etc. This will be log all input and output to shell and all, what will be send to terminal window. (Log-file system saves in 8kB buffer blocks).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2001 03:21 AM
04-14-2001 03:21 AM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2001 07:54 AM
04-14-2001 07:54 AM
Re: How to log down all commands silently?
man runacct and acctcom.
Once runacct is performed, commands performed by each user are logged in the background and they can be filtered and displayed via acctcom.
There are also other accounting commands that you can use for various purposes such as connection accounting and disk usage accounting etc.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 12:40 AM
04-17-2001 12:40 AM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 01:43 AM
04-17-2001 01:43 AM
Re: How to log down all commands silently?
http://www.courtesan.com/sudo/
In summary what sudo does is that it allow an ordinary user to execute commands on behalf of the root user. In addition you could pre-define command set for the operators and all commands executed by them will be logged in the /var/adm/syslog/syslog.log file.
Rgds,
Philip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 02:17 AM
04-17-2001 02:17 AM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 02:22 AM
04-17-2001 02:22 AM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 02:34 AM
04-17-2001 02:34 AM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 03:29 AM
04-17-2001 03:29 AM
Re: How to log down all commands silently?
Install and use Expect.
Using a script such as the following allow you to log both the commands as well as the output (while running in a korn shell) into a log file called /traces/logfile.
==
#!/usr/local/bin/expect
log_user 0
log_file /traces/logfile
spawn "/usr/bin/ksh"
interact
==
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 03:32 AM
04-17-2001 03:32 AM
Re: How to log down all commands silently?
I forgot to mention that by using the Expect script, you eliminate the problem you encounter while using the "script" command ie. "The script command will show the log begins and the log file name and this is the one that I don't want."
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 05:31 AM
04-17-2001 05:31 AM
Re: How to log down all commands silently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 05:37 AM
04-17-2001 05:37 AM