projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
And import pwd in userdir_ldap
[mirror/userdir-ldap.git]
/
ud-info
diff --git
a/ud-info
b/ud-info
index
795584b
..
1c91f1c
100755
(executable)
--- a/
ud-info
+++ b/
ud-info
@@
-116,7
+116,10
@@
AttrPrompt = {"cn": ["Common name or first name"],
"labeledURI": ["Web home page"],
"jabberJID": ["Jabber ID"],
"icqUin": ["ICQ UIN Number"],
"labeledURI": ["Web home page"],
"jabberJID": ["Jabber ID"],
"icqUin": ["ICQ UIN Number"],
- "VoIP": ["VoIP Address"]};
+ "VoIP": ["VoIP Address"],
+ "accountStatus": ["DD status"],
+ "accountComment": ["DD status comment"],
+ };
# Create a map of IDs to desc,value,attr
OrderedIndex = {};
# Create a map of IDs to desc,value,attr
OrderedIndex = {};
@@
-125,6
+128,10
@@
for at in AttrInfo.keys():
OrderedIndex[AttrInfo[at][1]] = [AttrInfo[at][0], "", at];
OrigOrderedIndex = copy.deepcopy(OrderedIndex);
OrderedIndex[AttrInfo[at][1]] = [AttrInfo[at][0], "", at];
OrigOrderedIndex = copy.deepcopy(OrderedIndex);
+for id in OrderedIndex:
+ if not AttrPrompt.has_key( OrderedIndex[id][2] ):
+ print "Warning: no AttrPrompt for %s"%(id)
+
# Show shadow information
def PrintShadow(Attrs):
Changed = int(GetAttr(Attrs,"shadowLastChange","0"));
# Show shadow information
def PrintShadow(Attrs):
Changed = int(GetAttr(Attrs,"shadowLastChange","0"));
@@
-437,7
+444,7
@@
while(1):
print "Set account to:"
print " 1) retiring (lock account but do not disable mail):"
print "Set account to:"
print " 1) retiring (lock account but do not disable mail):"
- print " 2)
retired (
lock account and disable mail):"
+ print " 2)
inactive (removed/emeritus/... -
lock account and disable mail):"
print " 3) memorial (lock account and disable mail):"
print " 4) active (do not change other settings, you will have to deal with them)"
print " q) return (no change)"
print " 3) memorial (lock account and disable mail):"
print " 4) active (do not change other settings, you will have to deal with them)"
print " q) return (no change)"
@@
-447,7
+454,7
@@
while(1):
if Resp == "1":
newstatus = "retiring %s"%(time.strftime("%Y-%m-%d"))
else:
if Resp == "1":
newstatus = "retiring %s"%(time.strftime("%Y-%m-%d"))
else:
- newstatus = "
retired
%s"%(time.strftime("%Y-%m-%d"))
+ newstatus = "
inactive
%s"%(time.strftime("%Y-%m-%d"))
l.modify_s(UserDn,[(ldap.MOD_REPLACE,"accountStatus",newstatus)])
Attrs[0][1]["accountStatus"] = [newstatus]
l.modify_s(UserDn,[(ldap.MOD_REPLACE,"accountStatus",newstatus)])
Attrs[0][1]["accountStatus"] = [newstatus]