- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- how to hide history
Operating System - Linux
1748209
Members
2834
Online
108759
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
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
тАО02-09-2009 10:31 PM
тАО02-09-2009 10:31 PM
HI,
when we login with root and apply any command default its store in history and later we can check it through history command, i would like to hide it, i know we can use history -c but i want to keep all history only for me and no one else can see it, how i can do this for same root user, any idea to anyone, thanks,
when we login with root and apply any command default its store in history and later we can check it through history command, i would like to hide it, i know we can use history -c but i want to keep all history only for me and no one else can see it, how i can do this for same root user, any idea to anyone, thanks,
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2009 02:35 AM
тАО02-10-2009 02:35 AM
Solution
hello,
What you can do is to have one history file for each user connected with root. Try to connect in two terminal and have a look to your tty.
Here is what I use to do to separate the history file for each root connection.
In your .profile put this :
HISTFILE=/root/.sh_history/.sh_history.`tty|sed 's/\///g'|cut -c4-`
PS1="$(hostname):\$PWD\#"
export HISTFILE PS1
You'll probably have to tune it according to the shell you're using.
Hope this help
Kenavo
Pat
What you can do is to have one history file for each user connected with root. Try to connect in two terminal and have a look to your tty.
Here is what I use to do to separate the history file for each root connection.
In your .profile put this :
HISTFILE=/root/.sh_history/.sh_history.`tty|sed 's/\///g'|cut -c4-`
PS1="$(hostname):\$PWD\#"
export HISTFILE PS1
You'll probably have to tune it according to the shell you're using.
Hope this help
Kenavo
Pat
Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2009 03:04 AM
тАО02-10-2009 03:04 AM
Re: how to hide history
Shalom,
Write a cron job to copy it off to a location only root can access.
You can not hide a file from the user that creates it without denying that user access and ending the logging process.
SEP
Write a cron job to copy it off to a location only root can access.
You can not hide a file from the user that creates it without denying that user access and ending the logging process.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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
тАО02-11-2009 12:49 AM
тАО02-11-2009 12:49 AM
Re: how to hide history
you should not login as root, use sudo. that will allow you to run root commands and your history will be yours only.
why are you using root? did you admin windows machines previously? unix/linux is an whole other world with other rules.
why are you using root? did you admin windows machines previously? unix/linux is an whole other world with other rules.
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP