X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=userdir_ldap.py;h=d70167d9e3682fc21d086d2b998a6083332a4f29;hb=fea6354172af1a49210329337dcf8daaa0778af1;hp=72d9762844e5ca3d404d65056e27aef4114b5418;hpb=3d6e8662945b586676fa28e9776c84f4fd7ca550;p=mirror%2Fuserdir-ldap.git diff --git a/userdir_ldap.py b/userdir_ldap.py index 72d9762..d70167d 100644 --- a/userdir_ldap.py +++ b/userdir_ldap.py @@ -29,6 +29,9 @@ userdir_gpg.SetKeyrings(string.split(ConfModule.keyrings,":")); # This is a list of common last-name prefixes LastNamesPre = {"van": None, "von": None, "le": None, "de": None, "di": None}; +# This is a list of common groups on Debian hosts +DebianGroups = {"Debian": 800, "guest": 60000} + # SSH Key splitting. The result is: # (options,size,modulous,exponent,comment) SSHAuthSplit = re.compile('^(.* )?(\d+) (\d+) (\d+) ?(.+)$'); @@ -356,3 +359,9 @@ def GetUID(l,Name,UnknownMap = {}): return (None,None); +def Group2GID(name): + """Returns the numerical id of a common group""" + for g in DebianGroups.keys(): + if name == g: + return DebianGroups[g] + return name