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

RSS

bash_history_timestamp (3) Versions 0.4.2

Adds timestamp to user bash history

Berkshelf/Librarian
Policyfile
Knife
cookbook 'bash_history_timestamp', '= 0.4.2'
cookbook 'bash_history_timestamp', '= 0.4.2', :supermarket
knife cookbook site install bash_history_timestamp
knife cookbook site 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 6.5.

I've manually tested and verified this cookbook with other Linux distros.

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.2 failed this metric

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