Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- System Administration
- >
- user command history
System Administration
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
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
- Email to a Friend
- Report Inappropriate Content
07-28-2010 08:50 PM
07-28-2010 08:50 PM
user command history
In our EDP department , administrators have root password , I want to know what command that they have used , I checked /root/.bash_history and use the up arrow key to check , but only found a part of information , can advise if I want to keep all comamnd that all root user have run in the server , what can i do ? besides , if possible , if I want to have the date/time that the user run the command , what can i do ? thx
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-28-2010 09:06 PM
07-28-2010 09:06 PM
Re: user command history
Hello.
Check the man page for bash, in particular these two variables:
HISTFILESIZE
HISTTIMEFORMAT
Regards,
Goran
Check the man page for bash, in particular these two variables:
HISTFILESIZE
HISTTIMEFORMAT
Regards,
Goran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-30-2010 12:33 AM
07-30-2010 12:33 AM
Re: user command history
You may want to investigate a culture shift away from using "naked" root by your administrators, to using sudo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-30-2010 11:05 AM
07-30-2010 11:05 AM
Re: user command history
You can configure sudo to restrict the access level.
To monitor the commands used by the root
Add this parameter in .bash_profile of user/root. You can change the HISTFILE path to your desire directory. We have chosen /root as it is home directory for root
HISTSIZE=500
HISTFILE=/root/.sh_history
export HISTSIZE HISTFILE
To monitor the commands used by the root
Add this parameter in .bash_profile of user/root. You can change the HISTFILE path to your desire directory. We have chosen /root as it is home directory for root
HISTSIZE=500
HISTFILE=/root/.sh_history
export HISTSIZE HISTFILE
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.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP