You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original issue 7 created by jaqx0r on 2008-04-18T13:35:38.000Z:
Here at Cardiff University we have a Novell e-directory system where
LDAP/posixAccount functionality was added late. This means the directory
structure is a bit idiosynchratic.
Anyway to cut to the chase: account entries lack gecos or cn. To get around
this I edited ldapsource to use fullName if cn or gecos were not found.
Original issue 7 created by jaqx0r on 2008-04-18T13:35:38.000Z:
Here at Cardiff University we have a Novell e-directory system where
LDAP/posixAccount functionality was added late. This means the directory
structure is a bit idiosynchratic.
Anyway to cut to the chase: account entries lack gecos or cn. To get around
this I edited ldapsource to use fullName if cn or gecos were not found.
diff -uNr nsscache-0.7.3.dist/nss_cache/sources/ldapsource.py
nsscache-0.7.3/nss_cache/sources/ldapsource.py
--- nsscache-0.7.3.dist/nss_cache/sources/ldapsource.py 2008-04-09
05:46:33.000000000 +0100
+++ nsscache-0.7.3/nss_cache/sources/ldapsource.py 2008-04-18
14:32:32.000000000 +0100
@@ -373,7 +373,7 @@
def init(self):
super(PasswdUpdateGetter, self).init()
self.attrs = ['uid', 'uidNumber', 'gidNumber', 'gecos', 'cn',
self.essential_fields = ['uid', 'uidNumber', 'gidNumber', 'homeDirectory']
def CreateMap(self):
@@ -389,7 +389,10 @@
pw.gecos = obj['gecos'][0]
elif 'cn' in obj:
pw.gecos = obj['cn'][0]
elif 'fullName' in obj:
else:
raise ValueError('Neither gecos nor cn found')
pw.name = obj['uid'][0]
in the short term this works but is a bit inelegant. I guess being able to
add mappings into the config would be nice e.g:
[mappings]
gecos = fullName
and have that config change the way that attributes are looked up
The text was updated successfully, but these errors were encountered: