cookbook 'bash_history_timestamp', '~> 0.4.4'
bash_history_timestamp (3) Versions 0.4.4 Follow0
Adds timestamp to user bash history
cookbook 'bash_history_timestamp', '~> 0.4.4', :supermarket
knife supermarket install bash_history_timestamp
knife supermarket download bash_history_timestamp
bash_history_timestamp
This simple cookbook adds timestamp logging to specified users' bash history. By default, only the root user's history is configured. You can specify other users to be managed by Chef with similar histtimeformatting.
This project originated to provide some quick auditing of bash history if you have multiple users sudo'ing to root.
Usage
You can configure the way the timestamp is formatted in the attributes file. Default format is '%F %T '
which will format like 'YYYY-mm-dd hh:mm:ss '.
Attributes
Name | Default | Description |
---|---|---|
['bash_history_timestamp']['flags'] |
'%F %T ' |
Configure formatting of history output. man histtimeformat for more info. |
['bash_history_timestamp']['bash_file'] |
'/root/.bashrc' |
Full path to bash file, typically .bashrc or .bash_profile
|
['bash_history_timestamp']['managed_users'] |
['root'] |
Testing
There are kitchen tests associated with CentOS 5.10, 6.6, 7.1.
I've manually tested and verified this cookbook with other Linux distros, but only CentOS 5+ is officially supported.
Serverspec tests may fail because when running the spec it does not actually create a login shell. man bash
for details. YMMV when running kitchen test
with other vagrant boxes.
TODO
Allow overrides of user homes instead of only supporting /home/<username>
Dependent cookbooks
line ~> 0.6.1 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.4.4 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.4 passed this metric
No Binaries Metric
0.4.4 passed this metric
Testing File Metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.4 failed this metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.4 passed this metric
No Binaries Metric
0.4.4 passed this metric
Testing File Metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.4 passed this metric
0.4.4 passed this metric
Testing File Metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.4 failed this metric
0.4.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number