Music non-stop.

Powered By Php

Mysql Logo

Powered By Apache

test-sudoers.py - Test a sudoers file through python
Posted by Joel (joelh-website at planetjoel dot com) on Wednesday, 5th of November, 2008 - 10:35:59 PM

I wrote a quick script called test-sudoers.py which reads a sudoers file and can answer questions like "what commands can a particular user run on a particular host?" and "can a particular user run a command?". The latter is particularly useful because using return codes that can be scripted and allow certain actions based on whether they can run a specific command.

Its also very useful if you are writing a massive sudoers file (as I manage at my current job) and need tools to probe and prod it before rolling it out.

UPDATE 9/1/2009: v0.2 online which features support for netgroups. If you have installed my libnss netgroup bindings then you can perform netgroup based lookups using test-sudoers

Add a comment

Comments

All comments owned by their poster.

Name: Markey
Email: chrismarkey at bigpond dot com
Time: 6/11/08 - 16:22:22

hmmmmmmmmmmmmm...........

did you find this so exciting it it warranted your first post in over a year?

JOELULATE!!!

Name: Zzzzzzzz
Email: Zzzzzzzz at Zzzzzzzz dot com
Time: 12/11/08 - 10:03:54

Zzzzzzzzzzzzzzzzzz