4 ms·
Some shells do have this built in, for example bash's history file, typically set to ~/.bash_history
by jrcii 11y ago
Some shells do have this built in, for example bash's history file, typically set to ~/.bash_history
- jlgaddis 11y agoWhich is easily defeated, of course ...
- jrcii 11y agoSome file systems support append-only permissions, although I've never used them. I wonder if that would work with bash's history file?
- detaro 11y agoNo, since you can just turn it off or prepend all your commands with a space to hide them.
- jrcii 11y agoYou can remove ignorespace from HISTCONTROL for the latter, and for the former, can't you just remove chattr's execute permission for that user?
- jlgaddis 11y agoThe user can point $HISTFILE elsewhere (e.g., /dev/null), `unset` it, use another shell, ...
- jrcii 11y agoIt looks like you could lock down the environment variables with rbash http://unix.stackexchange.com/questions/66627/is-there-anyway-to-set-a-readonly-environment-variable http://unix.stackexchange.com/questions/66627/is-there-anywa... But that's getting into no-man's land I guess