Skip to content

Report on sudoers authorization given a hostname and a sudoers file

Notifications You must be signed in to change notification settings

jeremypruitt/sudoers-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sudoers-report

DESCRIPTION

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.

SYSTEM REQUIREMENTS

  • Unix like operating system (OS X, FreeBSD, RHEL, Ubuntu, etc)
  • Perl 5.8+
  • Hash::Merge
  • YAML::Tiny

INSTALLATION

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

RUNNING

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>

CONTRIBUTE

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:

  1. Clone down your fork
  2. Create a thoughtfully named topic branch to contain your change
  3. Hack away
  4. Add tests and make sure everything still passes (see: RUN THE TESTS)
  5. If you are adding new functionality, document it in the README
  6. Do not change the version number, I will do that on my end
  7. If necessary, rebase your commits into logical chunks, without errors
  8. Push the branch up to GitHub
  9. Send a pull request to the jeremypruitt/sudoers-report project.

RUN THE TESTS

$ perl t/Sudoers.t

About

Report on sudoers authorization given a hostname and a sudoers file

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages