Feature #11029
closedEnable command history in the shell
0%
Description
Historically we disabled shell command history tracking primarily because embedded/NanoBSD had a read-only filesystem. Those platforms have been deprecated for some time now, so that roadblock is no longer in the way and we could enable command history which would be very convenient for admins who spend any significant amount of time in the shell.
There is a potential security concern if someone types a command with sensitive parameters (e.g. password, API key, etc) and that gets logged in the history file, so there are a couple choices:
1. Make history opt-in by enabling a setting
2. Make history opt-out for those who are concerned
Either way we can also document a method to clear it (history -c; history -S
)
EDIT: The method for setting this value has changed since this Redmine issue. See #12675 for updated information.
Related issues
Updated by Jim Pingle about 4 years ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
Applied in changeset ce9d7ba143c968e672abb4265cca19f93d851e7e.
Updated by Viktor Gurov almost 4 years ago
- Status changed from Feedback to Resolved
Updated by Ronald Antony over 1 year ago
As of CE2.7.0 beta this issue is still misleadingly referenced in ~/.tcshrc misleading users about how to enable permanent history saving, even though the setting is now part of the system configuration and set through the web interface in the user settings.
# Enable command history storage and related settings if the user is configured
# to do so. See https://redmine.pfsense.org/issues/11029
The comment in the ~/.tcshrc should be updated appropriately, otherwise users will scratch their heads and lose a lot of hair wondering why despite the presence of the .keephistory file, no history is actually kept.
Updated by Jim Pingle over 1 year ago
- Related to Feature #12675: Move command line history to a GUI option stored in ``config.xml`` rather than a manual flag file added
Updated by Jim Pingle over 1 year ago
I updated the info here and linked to the later issue which changed the behavior, so there is no mention of the ~/.keephistory file which is deprecated and the source no longer needs changed.