add VoIP
[mirror/userdir-ldap.git] / ud-info
diff --git a/ud-info b/ud-info
index 3591161..e533a9e 100755 (executable)
--- a/ud-info
+++ b/ud-info
@@ -17,7 +17,7 @@
 #    -r    Enable 'root' functions, do this if your uid has access to
 #          restricted variables.
 
-import string, time, os, pwd, sys, getopt, ldap, crypt, whrandom, readline, copy;
+import time, os, pwd, sys, getopt, ldap, crypt, readline, copy;
 from userdir_ldap import *;
 
 RootMode = 0;
@@ -45,9 +45,18 @@ AttrInfo = {"cn": ["First Name", 101],
            "icqUin": ["ICQ UIN",14],
            "jabberJID": ["Jabber ID",15],
            "privateSub": ["Debian-Private",16],
+           "gender": ["Gender",17],
+           "birthDate": ["Date of Birth",18],
+           "mailDisableMessage": ["Mail Disabled",19],
+           "mailGreylisting": ["Mail Greylisting",20],
+           "mailCallout": ["Mail Callouts",21],
+            "mailRBL": ["Mail RBLs",22],
+            "mailRHSBL": ["Mail RHSBLs",23],
+            "mailWhitelist": ["Mail Whitelist",24],
            "comment": ["Comment",116],
            "userPassword": ["Crypted Password",117],
-            "dnsZoneEntry": ["d.net Entry",118]};
+            "dnsZoneEntry": ["d.net Entry",118],
+            "VoIP": ["VoIP Address",119]}; 
 
 AttrPrompt = {"cn": ["Common name or first name"],
               "mn": ["Middle name (or initial if it ends in a dot)"],
@@ -67,13 +76,22 @@ AttrPrompt = {"cn": ["Common name or first name"],
               "supplementaryGid": ["Groups the user is in"],
              "allowedHost": ["Grant access to certain hosts"],
               "privateSub": ["Debian-Private mailing list subscription"],
+             "gender": ["ISO5218 Gender code (1=male,2=female,9=unspecified)"],
+             "birthDate": ["Date of Birth (YYYYMMDD)"],
+             "mailDisableMessage": ["Error message to return via SMTP"],
+             "mailGreylisting": ["SMTP Greylisting (TRUE/FALSE)"],
+             "mailCallout": ["SMTP Callouts (TRUE/FALSE)"],
+              "mailRBL": ["SMTP time RBL lists"],
+              "mailRHSBL": ["SMTP time RHSBL lists"],
+              "mailWhitelist": ["SMTP time whitelist from other checks"],
               "member": ["LDAP Group Member for slapd ACLs"],
              "latitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
              "longitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
              "dnsZoneEntry": ["DNS Zone fragment associated this this user"],
               "labeledURI": ["Web home page"],
               "jabberJID": ["Jabber ID"],
-              "icqUin": ["ICQ UIN Number"]};
+              "icqUin": ["ICQ UIN Number"],
+              "VoIP": ["VoIP Address"]};
 
 # Create a map of IDs to desc,value,attr
 OrderedIndex = {};
@@ -174,7 +192,8 @@ def ShowAttrs(Attrs):
 # Change a single attribute
 def ChangeAttr(Attrs,Attr):
    if (Attr == "supplementaryGid" or Attr == "allowedHost" or \
-       Attr == "member" or Attr == "dnsZoneEntry"):
+       Attr == "member" or Attr == "dnsZoneEntry" or Attr == "mailWhitelist" or \
+       Attr == "mailRBL" or Attr == "mailRHSBL"):
       return MultiChangeAttr(Attrs,Attr);
 
    print "Old value: '%s'" % (GetAttr(Attrs,Attr,""));
@@ -212,7 +231,7 @@ def MultiChangeAttr(Attrs,Attr):
    Attrs[1][Attr].sort();
    print "Old values: ",Attrs[1][Attr];
 
-   Mode = string.upper(raw_input("[D]elete or [A]dd? "));
+   Mode = raw_input("[D]elete or [A]dd? ").upper()
    if (Mode != 'D' and Mode != 'A'):
       return;