Popular recipes by realityexists http://code.activestate.com/recipes/users/4178189/2011-06-03T02:14:18-07:00ActiveState Code RecipesGet additional group IDs for Unix user (pwd/grp modules) (Python)
2011-06-03T02:14:18-07:00realityexistshttp://code.activestate.com/recipes/users/4178189/http://code.activestate.com/recipes/577733-get-additional-group-ids-for-unix-user-pwdgrp-modu/
<p style="color: grey">
Python
recipe 577733
by <a href="/recipes/users/4178189/">realityexists</a>
(<a href="/recipes/tags/group/">group</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/passwd/">passwd</a>, <a href="/recipes/tags/security/">security</a>, <a href="/recipes/tags/unix/">unix</a>).
</p>
<p>The Python stdlib pwd module provides an easy way to get the primary group ID, but no way to get additional group IDs. This is a simple function that returns the additional group IDs for a given username.</p>