sudoers-report is a simple Perl script that parses a given sudoers file and returns all user aliases and specs relevant to a given hostname. This is especially useful with large legacy sudoers files where it is difficult to tell who has access to do what on a given server.
- Unix like operating system (OS X, FreeBSD, RHEL, Ubuntu, etc)
- Perl 5.8+
- Hash::Merge
- YAML::Tiny
For now you just clone the repository and cd into the resulting directory:
$ git clone https://github.com/jeremypruitt/sudoers-report.git
$ cd sudoers-report
To get help on the command line utility, you can run it like so:
$ bin/sudoers-report --help
This will parse a sudoers file for a given hostname and return all relevant user aliases and specs:
$ bin/sudoers-report --filename <path_to_sudoers_file> \
--hostname <target_hostname>
If you'd like to hack on sudoers-report, start by forking the repo on GitHub:
http://github.com/jeremypruitt/sudoers-report
The best way to get your changes merged back into core is as follows:
- Clone down your fork
- Create a thoughtfully named topic branch to contain your change
- Hack away
- Add tests and make sure everything still passes (see: RUN THE TESTS)
- If you are adding new functionality, document it in the README
- Do not change the version number, I will do that on my end
- If necessary, rebase your commits into logical chunks, without errors
- Push the branch up to GitHub
- Send a pull request to the jeremypruitt/sudoers-report project.
$ perl t/Sudoers.t