fonzinc/docker-jitsi-meet 0

Jitsi Meet on Docker

fonzinc/librdkafka 0

The Apache Kafka C/C++ library

fonzinc/sandbox 0

A place to play around

issue commentcobbler/cobbler

PAM authentication failure

Yes, PAM authentication seems to work as expected after applying the patch. I have not encountered any additional issues, but I did not conduct a full audit of the module for additional type issues.

I would love to see the patch included. Thanks!


comment created time in a month

issue commentcobbler/cobbler

PAM Authentication failure

The following patch seems to have fixed the issue for me:

--- /usr/lib/python3.6/site-packages/cobbler/modules/authentication/	2020-08-24 22:12:16.178380466 +0000
+++ /usr/lib/python3.6/site-packages/cobbler/modules/authentication/	2020-08-24 22:19:34.634209255 +0000
@@ -124,7 +124,7 @@
         p_response[0] = cast(addr, POINTER(PamResponse))
         for i in range(n_messages):
             if messages[i].contents.msg_style == PAM_PROMPT_ECHO_OFF:
-                pw_copy = STRDUP(str(password))
+                pw_copy = STRDUP(password.encode())
                 p_response.contents[i].resp = cast(pw_copy, c_char_p)
                 p_response.contents[i].resp_retcode = 0
         return 0
@@ -138,7 +138,7 @@
     handle = PamHandle()
     conv = PamConv(my_conv, 0)
-    retval = PAM_START(service, username, pointer(conv), pointer(handle))
+    retval = PAM_START(service.encode(), username.encode(), pointer(conv), pointer(handle))
     if retval != 0:
         # TODO: This is not an authentication error, something

comment created time in a month

issue openedcobbler/cobbler

PAM Authentication failure

Describe the bug

<!--- A clear and concise description of what the bug is. -->

<!--- HINT: You can paste links for long logs or larger files --> Enabling authentication.pam module results in TypeError exception and failure to authenticate.

To Reproduce

  1. Change authentication module to "authentication.pam" in
  2. Restart cobbler service
  3. Attempt to login via web UI
  4. See error in cobbler.log
DEBUG | authn_pam: PAM service is login
INFO | Exception occured: <class 'ctypes.ArgumentError'>
INFO | Exception value: argument 1: <class 'TypeError'>: wrong type
INFO | Exception Info:
  File "/usr/lib/python3.6/site-packages/cobbler/", line 3477, in _dispatch
    return method_handle(*params)

  File "/usr/lib/python3.6/site-packages/cobbler/", line 3233, in login
    if self.__validate_user(login_user, login_password):

  File "/usr/lib/python3.6/site-packages/cobbler/", line 3113, in __validate_user
    return self.api.authenticate(input_user, input_password)

  File "/usr/lib/python3.6/site-packages/cobbler/", line 1599, in authenticate
    rc = self.authn.authenticate(self, user, password)

  File "/usr/lib/python3.6/site-packages/cobbler/modules/authentication/", line 141, in authenticate
    retval = PAM_START(str(service), str(username), pointer(conv), pointer(handle))

Expected behavior

<!--- A clear and concise description of what you expected to happen. --> PAM authentication should succeed.


<!--- Paste output from cobbler version -->

Cobbler 3.1.2
  source: ?, ?
  build time: Sun May 31 02:32:34 2020


<!--- If applicable, add screenshots to help explain your problem. -->

Additional context

<!--- Add any other context about the problem here. -->

created time in a month