Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

bash_history_timestamp (3) Versions 0.4.3

Adds timestamp to user bash history

Policyfile
Berkshelf
Knife
cookbook 'bash_history_timestamp', '= 0.4.3', :supermarket
cookbook 'bash_history_timestamp', '= 0.4.3'
knife supermarket install bash_history_timestamp
knife supermarket download bash_history_timestamp
README
Dependencies
Quality 0%

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.

Foodcritic Metric
            

0.4.3 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/0d697a58a37617a9c915691d/bash_history_timestamp/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/0d697a58a37617a9c915691d/bash_history_timestamp/metadata.rb:1