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
01-04-2007 05:13 AM
01-04-2007 05:13 AM
Sudo
I am login with my user id and password and then sudo su – mywork area , is there any chance to have a history of commands executed my me , after sudo or before sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2007 05:52 AM
01-04-2007 05:52 AM
Re: Sudo
You can set it up.
export HISTFILE=~/.sh_history
export HISTSIZE=5000
This makes a file and limits the size. Not available with c shell.
You can if you have permissions build this feature into your .profile.
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
01-04-2007 06:41 AM
01-04-2007 06:41 AM
Re: Sudo
sh-posix and ksh store the command history to ~/.sh_history by default. Both of these shells have a default HISTSIZE of 128, but this can be changed by exporting the new value to the environment.
If you'd like the command history for user1 and user2 to be recorded to the same file, add, for instance, 'HISTFILE=/usr/local/share/hist; export HISTFILE' to ~/.profile for each user.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2007 02:25 PM
01-04-2007 02:25 PM
Re: Sudo
Remember sudo also logs the commands in the syslog.log file..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2007 08:06 PM
01-04-2007 08:06 PM
Re: Sudo
If you put 'script /tmp/roothist.txt' in root's profile, all commands issued by root will be recorded in this file.
'script -a /tmp/roothist.txt' will also append the output of these commands.
Do keep an eye on these files, though.. they are NOT automatically cleaned up and could fill up lots of diskspace after a while.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2007 08:08 PM
01-04-2007 08:08 PM
Re: Sudo
Cheers