From: Peter Palfrader Date: Thu, 10 Jan 2008 14:33:29 +0000 (+0100) Subject: Merge from alioth X-Git-Tag: userdir-ldap-0.3.16~15 X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=69b37c058b347687d7b75fa64efe70b33460d457;hp=dabc4243524d6c43a709f0c64828e70d9e51fdfa;p=mirror%2Fuserdir-ldap.git Merge from alioth --- diff --git a/debian/changelog b/debian/changelog index fe0176e..4219b3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,10 @@ userdir-ldap (0.3.15+xxx) XXunstable; urgency=low * ud-generate: Set shadow expiry to 1 for locked accounts [mhy]. * update doc/slapd-config.txt: labeledURL was removed from the schema but not the slapd.conf example. Do that now [mhy]. + * ud-generate: Mark that no passwords are exported also in the + generated passwd file, not only in the shadow file (by using a "*" + as password (meaning "no password"), instead of "x" (meaning "do I + look like a passwd from the nineties? Look into /etc/shadow!")) [HE]. [ Mark Hymers ] * ud-userimport, ud-groupadd, ud-roleadd, ud-useradd, userdir_ldap.py: @@ -28,10 +32,10 @@ userdir-ldap (0.3.15+xxx) XXunstable; urgency=low ud-{user,group,role}add and abstract them out into userdir_ldap.py * ud-useradd: Avoid a TypeError exception when constructing the template filename - * Remove use of deprecated functions from the string module + * Remove use of deprecated functions from the string module * ud-arbimport: os.exit -> sys.exit - -- Mark Hymers Wed, 26 Dec 2007 20:54:28 +0000 + -- Peter Palfrader Thu, 10 Jan 2008 15:32:16 +0100 userdir-ldap (0.3.15) unstable; urgency=low diff --git a/ud-generate b/ud-generate index 2cc48aa..8537f0c 100755 --- a/ud-generate +++ b/ud-generate @@ -88,7 +88,7 @@ def Done(File,F,Fdb): os.rename(File + ".tdb.tmp",File+".tdb"); # Generate the password list -def GenPasswd(l,File,HomePrefix): +def GenPasswd(l,File,HomePrefix,PwdMarker): F = None; try: F = open(File + ".tdb.tmp","w"); @@ -107,7 +107,8 @@ def GenPasswd(l,File,HomePrefix): if len(GetAttr(x,"gecos")) > 100 or len(GetAttr(x,"loginShell")) > 50: continue; - Line = "%s:x:%s:%s:%s:%s%s:%s" % (GetAttr(x,"uid"),\ + Line = "%s:%s:%s:%s:%s:%s%s:%s" % (GetAttr(x,"uid"),\ + PwdMarker,\ GetAttr(x,"uidNumber"),GetAttr(x,"gidNumber"),\ GetAttr(x,"gecos"),HomePrefix,GetAttr(x,"uid"),\ GetAttr(x,"loginShell")); @@ -852,7 +853,10 @@ while(1): DoLink(GlobalDir,OutDir,"disabled-accounts") sys.stdout.flush(); - GenPasswd(l,OutDir+"passwd",Split[1]); + if ExtraList.has_key("[NOPASSWD]"): + GenPasswd(l,OutDir+"passwd",Split[1], "*"); + else: + GenPasswd(l,OutDir+"passwd",Split[1], "x"); sys.stdout.flush(); GenGroup(l,OutDir+"group"); if ExtraList.has_key("[UNTRUSTED]"):