我在使用 nsscache 缓存 samba4 AD 中的用户时遇到问题,因为 AD 中没有uid
,而是samAccountName
或cn
。当我使用 uid-like 属性时:
# Default uid-like attribute
ldap_uidattr = 'sAMAccountName'
我收到以下错误:
# nsscache update --full
WARNING:root:invalid object passed: 'uid' not in {'modifyTimeStamp': ['20190915102717.0Z'], 'sAMAccountName': ['user'], 'cn': ['user']}
Traceback (most recent call last):
File "/usr/sbin/nsscache", line 33, in <module>
return_value = nsscache_app.Run(sys.argv[1:], os.environ)
File "/usr/lib/python2.7/dist-packages/nss_cache/app.py", line 240, in Run
retval = command_callable().Run(conf=conf, args=args)
File "/usr/lib/python2.7/dist-packages/nss_cache/command.py", line 230, in Run
force_lock=options.force_lock)
File "/usr/lib/python2.7/dist-packages/nss_cache/command.py", line 303, in UpdateMaps
force_write=force_write)
File "/usr/lib/python2.7/dist-packages/nss_cache/update/updater.py", line 275, in UpdateFromSource
force_write, location=None)
File "/usr/lib/python2.7/dist-packages/nss_cache/update/map_updater.py", line 75, in UpdateCacheFromSource
location=location)
File "/usr/lib/python2.7/dist-packages/nss_cache/sources/source.py", line 63, in GetMap
return self.GetPasswdMap(since)
File "/usr/lib/python2.7/dist-packages/nss_cache/sources/ldapsource.py", line 371, in GetPasswdMap
since=since)
File "/usr/lib/python2.7/dist-packages/nss_cache/sources/ldapsource.py", line 589, in GetUpdates
raise ValueError('Invalid object passed: %r', obj)
ValueError: ('Invalid object passed: %r', {'modifyTimeStamp': ['20190915102717.0Z'], 'sAMAccountName': ['user'], 'cn': ['user']})
是否可以使用活动目录配置 nsscache ?
谢谢