[SAC] [OSGeo] #2782: Can't add new user to shell group

#2782: Can't add new user to shell group
---------------------------+-----------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: critical | Milestone: Unplanned
Component: Systems Admin | Keywords:
---------------------------+-----------------------
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')
}}}
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2782&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2782: Can't add new user to shell group
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: critical | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+----------------------------------------
Changes (by robe):

* milestone: Unplanned => Sysadmin Contract 2022-II

Comment:

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)
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2782#comment:1&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2782: Can't add new user to shell group
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: critical | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution: fixed
Keywords: |
---------------------------+----------------------------------------
Changes (by robe):

* status: new => closed
* resolution: => fixed

Comment:

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.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2782#comment:2&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2782: Can't add new user to shell group
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: critical | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution: fixed
Keywords: ldap |
---------------------------+----------------------------------------
Changes (by strk):

* keywords: => ldap

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2782#comment:3&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.