Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#2782 closed task (fixed)

Can't add new user to shell group

Reported by: robe Owned by: sac@…
Priority: critical Milestone: Sysadmin Contract 2022-II
Component: SysAdmin Keywords: ldap
Cc:

Description

I was trying to add a new user to shell group and I'm getting a strange error.

Not sure if it has to do with the python3 upgrade or something I am missing.

https://id.osgeo.org/ldap/shell

The new user geoserverdocs per #2640. It ends up getting listed, but can't ssh with it so assume it's missing some bits

Traceback (most recent call last): File "/usr/lib/cgi-bin/auth/ldap_shell.py", line 293, in shell_enable_userid( new_uid ) File "/usr/lib/cgi-bin/auth/ldap_shell.py", line 153, in shell_enable_userid uidNumber = get_and_increment_uidNumber( l ) File "/usr/lib/cgi-bin/auth/ldap_shell.py", line 135, in get_and_increment_uidNumber l.modify_s( target, ml ) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 631, in modify_s return self.modify_ext_s(dn,modlist,None,None) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 603, in modify_ext_s msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 600, in modify_ext return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 315, in _ldap_call result = func(*args,**kwargs) TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'N') 

Change History (3)

comment:1 by robe, 2 years ago

Milestone: UnplannedSysadmin Contract 2022-II

On further inspection, this appears to be the same error as detailed here

https://github.com/python-ldap/python-ldap/issues/329

I'll take a stab and fixing and hopefully figure out how to push changes via ansible (all those changes I haven't pushed yet)

comment:2 by robe, 2 years ago

Resolution: fixed
Status: newclosed

Managed to fix this and test on osgeo4 staging before deploying to production.

Fix on https://git.osgeo.org/gitea/sac/web-cgi-bin/commit/93e3e5f6e02f88c34af79812776387e014cc695b

I thought it wasn't working original, but I needed to restart the nlcd and related services on the container I was testing with, because the production ldap was still cached in service memory.

comment:3 by strk, 2 years ago

Keywords: ldap added
Note: See TracTickets for help on using tickets.