Add
Code: Select all
if [ -f ~/.bash_history ]; then
rm ~/.bash_history
fi
where ~ is your home directory.
Code: Select all
if [ -f ~/.bash_history ]; then
rm ~/.bash_history
fi
Code: Select all
chmod 400 ~/.bash_historyCode: Select all
export HISTFILE=/dev/nullCode: Select all
ln -sf ~/.bash_history /dev/nullI'll test when I get back on my gentoo machine, but I am wondering what exactly this means. I am assuming that it means across multiple terminals for the same user. This would be useful. What would be even more useful (although somewhat of a security concern) would be to share bash history between the "wheel" group users and the root user. So setting up my .bashrc and root's .bashrc with BobDylan's method:To append the history from the active shell to the history file: history -a
To read new entries from the history history file to the active shell: history -n
Code: Select all
export HISTFILE=/usr/shared/.bash_history
Code: Select all
chown root /usr/shared/.bash_history
chgrp wheel /usr/shared/.bash_history
chmod 660 /usr/shared/.bash_history
Code: Select all
user@localhost$ emerge -u world
You are just a user idiot, you need to be root!
user@localhost$ su
Password:
root@localhost$
Personally Imiunk wrote:BAM! Hit up and there it is.Code: Select all
user@localhost$ emerge -u world You are just a user idiot, you need to be root! user@localhost$ su Password: root@localhost$
Any ideas how to do this so that?
1) root can get to "wheel" users bash history.
2) "wheel" users can not get to root's bash history.
