-userdir-ldap (0.3.7x) xnstable; urgency=low
+userdir-ldap (0.3.78) unstable; urgency=low
* Start refactoring ud-generate:
- If environment variables UD_CREDENTIALS, UD_GENERATEDIR, UD_HMAC_KEY
* Add ud-krb-reset, and make ud-mailgate call it when
receiving a mail at chpasswd@ saying
'Please change my Kerberos password'.
+ * ud-generate: Add an extra output file called all-users.json that
+ can be used on one of the AFS hosts to create afs users.
- -- Peter Palfrader <weasel@debian.org> Fri, 10 Sep 2010 14:52:43 +0200
+ -- Peter Palfrader <weasel@debian.org> Mon, 13 Sep 2010 19:08:34 +0200
userdir-ldap (0.3.77) unstable; urgency=low
Package: userdir-ldap
Architecture: all
Depends: ${python:Depends}, python-ldap, perl5, procmail, rsync, libnss-db
-Suggests: libnet-ldap-perl, libcrypt-blowfish-perl, gnupg (>= 1.0.3), python-net, python-gdbm, libdate-manip-perl, liburi-perl, userdir-ldap-cgi
+Suggests: libnet-ldap-perl, libcrypt-blowfish-perl, gnupg (>= 1.0.3), python-net, python-gdbm, libdate-manip-perl, liburi-perl, userdir-ldap-cgi, python (>= 2.6) | python-simplejson
Description: Login User Directory in LDAP support scripts
These scripts simplifiy the creation and management of a LDAP based user
directory. Included are scripts to import existing passwd, group and shadow
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
+try:
+ import simplejson as json
+except ImportError:
+ import json
+ if not '__author__' in json.__dict__:
+ sys.stderr.write("Warning: This is probably the wrong json module. We want python 2.6's json\n")
+ sys.stderr.write("module, or simplejson on pytyon 2.5. Let's see if/how stuff blows up.\n")
global Allowed
global CurrentHost
# Return the list of users so we know which keys to export
return userlist
+def GenAllUsers(accounts, file):
+ f = None
+ try:
+ OldMask = os.umask(0022)
+ f = open(file + ".tmp", "w", 0644)
+ os.umask(OldMask)
+
+ all = []
+ for a in accounts:
+ all.append( { 'uid': a['uid'],
+ 'uidNumber': a['uidNumber'],
+ 'active': a.pw_active() and a.shadow_active() } )
+ json.dump(all, f)
+
+ # Oops, something unspeakable happened.
+ except:
+ Die(file, f, None)
+ raise
+ Done(file, f, None)
+
# Generate the shadow list
def GenShadow(accounts, File):
F = None
# Compatibility.
GenForward(accounts, GlobalDir + "forward-alias")
+GenAllUsers(accounts, 'all-accounts.json')
accounts = filter(lambda a: not a in accounts_disabled, accounts)
SSHFiles = GenSSHShadow(accounts)
DoLink(GlobalDir, OutDir, "mail-rbl")
DoLink(GlobalDir, OutDir, "mail-rhsbl")
DoLink(GlobalDir, OutDir, "mail-whitelist")
+ DoLink(GlobalDir, OutDir, "all-accounts.json")
GenCDB(filter(lambda x: IsInGroup(x), accounts), OutDir + "user-forward.cdb", 'emailForward')
GenCDB(filter(lambda x: IsInGroup(x), accounts), OutDir + "batv-tokens.cdb", 'bATVToken')
GenCDB(filter(lambda x: IsInGroup(x), accounts), OutDir + "default-mail-options.cdb", 'mailDefaultOptions')