Book Image

Learning Puppet Security

Book Image

Learning Puppet Security

Overview of this book

Table of Contents (17 chapters)
Learning Puppet Security
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The saz/sudo module


The next module on our module examination journey is the saz/sudo module. This module presents a great methodology to manage the sudoers file. It is actually used by a large number of other modules for sudoers file management.

The module itself is fairly simple, so this section will be short as we go over it.

The sudo module manages all aspects of your sudoers configuration, which can catch some people by surprise. The module has options to leave the system configuration alone, as well as not purging unmanaged sudoers entries. The recommended path is to manage all the sudoer resources; however, the options are there if needed.

To install the sudoers module, we'll issue the following command:

sudo puppet module install saz-sudo

We'll now create a few simple rules. But, before we do so, we need to take a look at the /etc/sudoers file. If you look at it, at the very bottom, you'll see an entry for Vagrant. We must make sure we preserve this entry or we will cause Vagrant to...