import string, time, posix, pwd, sys, getopt, ldap, crypt, whrandom, readline, copy;
from userdir_ldap import *;
import string, time, posix, pwd, sys, getopt, ldap, crypt, whrandom, readline, copy;
from userdir_ldap import *;
"latitude": ["Latitude",12],
"longitude": ["Longitude",13],
"comment": ["Comment",114],
"latitude": ["Latitude",12],
"longitude": ["Longitude",13],
"comment": ["Comment",114],
- "userpassword": ["Crypted Password",115]};
+ "userpassword": ["Crypted Password",115],
+ "dnszoneentry": ["d.net Entry",116]};
AttrPrompt = {"cn": ["Common name or first name"],
"mn": ["Middle name (or initial if it ends in a dot)"],
AttrPrompt = {"cn": ["Common name or first name"],
"mn": ["Middle name (or initial if it ends in a dot)"],
"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"],
"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"],
"labeledurl": ["Web home page"]};
# Create a map of IDs to desc,value,attr
"labeledurl": ["Web home page"]};
# Create a map of IDs to desc,value,attr
- # PGP Print
- if (len(x) == 32):
- I = 0;
- while (I < len(x)):
- print x[I]+x[I+1],
- I = I + 2;
- if I == 32/2:
- print "",
- elif (len(x) == 40):
- # GPG Print
- I = 0;
- while (I < len(x)):
- print x[I]+x[I+1]+x[I+2]+x[I+3],
- I = I + 4;
- if I == 40/2:
- print "",
+# Print the SSH RSA Authentication keys for a user
+def PrintSshRSAKeys(Attrs):
+ if Attrs[1].has_key("sshrsaauthkey") == 0:
+ return;
+ First = 0;
+ for x in Attrs[1]["sshrsaauthkey"]:
+ if First == 0:
+ print "%-24s:" % ("SSH RSA Auth Keys"),
+ First = 1;
# Change a single attribute
def ChangeAttr(Attrs,Attr):
# Change a single attribute
def ChangeAttr(Attrs,Attr):
return MultiChangeAttr(Attrs,Attr);
print "Old value: '%s'" % (GetAttr(Attrs,Attr,""));
return MultiChangeAttr(Attrs,Attr);
print "Old value: '%s'" % (GetAttr(Attrs,Attr,""));
# Query the server for all of the attributes
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=" + User);
# Query the server for all of the attributes
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=" + User);