nsswitch: Add try_authok option to pam_winbind

github at samba.org github at samba.org
Thu Jun 7 07:36:08 UTC 2018


New comment by sathieu on Samba Github repository

https://github.com/samba-team/samba/pull/168#issuecomment-395323012
Comment:
Here is the failing log (`could not recover authentication token`, in `pam_winbind.c` line 2229):
```
[1(0)/2 at 0s] samba.tests.pam_winbind with options 'try_authtok'(local)(ad_member)
PWRAP_DEBUG(29944) - pwrap_init: Initialize pam_wrapper
PWRAP_DEBUG(29944) - pwrap_init: Copy /usr/lib/x86_64-linux-gnu/libpam.so.0.83.1 to /tmp/pam.f/lib/libpam.so.0
PWRAP_DEBUG(29944) - copy_confdir: Copy config files from /home/mathieu/src/git.samba.org/samba/st/tmp/pam_services to /tmp/pam.f
PWRAP_DEBUG(29944) - pwrap_init: Successfully initialized pam_wrapper
PWRAP_DEBUG(29945) - pwrap_init: Initialize pam_wrapper
PWRAP_DEBUG(29945) - pwrap_init: Copy /usr/lib/x86_64-linux-gnu/libpam.so.0.83.1 to /tmp/pam.g/lib/libpam.so.0
PWRAP_DEBUG(29945) - copy_confdir: Copy config files from /home/mathieu/src/git.samba.org/samba/st/tmp/pam_services to /tmp/pam.g
PWRAP_DEBUG(29945) - pwrap_init: Successfully initialized pam_wrapper
PWRAP_DEBUG(29945) - pwrap_load_lib_handle: Opened /tmp/pam.g/lib/libpam.so.0

PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] ENTER: pam_sm_chauthtok (flags: 0x4000)
PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] STATE: ITEM(PAM_SERVICE) = "samba" (0x55a119987fe0)
PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] STATE: ITEM(PAM_USER) = "LOCALADMEMBER/root" (0x55a1199880b0)
PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] STATE: ITEM(PAM_CONV) = 0x55a119988180
PWRAP_DEBUG(29945) - SYSLOG(7): username [LOCALADMEMBER/root] obtained
PWRAP_DEBUG(29945) - SYSLOG(7): getting password (0x00009021)
PWRAP_DEBUG(29945) - SYSLOG(5): could not recover authentication token
PWRAP_DEBUG(29945) - SYSLOG(7): unable to obtain a password
PWRAP_DEBUG(29945) - SYSLOG(5): password - (old) token not obtained
PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] LEAVE: pam_sm_chauthtok returning 21 (PAM_AUTHTOK_RECOVER_ERR)
PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] STATE: ITEM(PAM_SERVICE) = "samba" (0x55a119987fe0)
PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] STATE: ITEM(PAM_USER) = "LOCALADMEMBER/root" (0x55a1199880b0)
PWRAP_DEBUG(29945) - SYSLOG(7): [pamh: 0x55a119be8200] STATE: ITEM(PAM_CONV) = 0x55a119988180
UNEXPECTED(error): samba.tests.pam_winbind with options 'try_authtok'(local).samba.tests.pam_winbind_options.PamOptionsTests.test_chauthtok(ad_member)
REASON: Exception: Exception: Traceback (most recent call last):
  File "/home/mathieu/src/git.samba.org/samba/bin/python/samba/tests/pam_winbind_options.py", line 34, in test_chauthtok
    res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password, newpassword, newpassword], [password, newpassword, newpassword])
PamTestError: Error [2]: Test case { pam_operation [5] expected_rv [0] flags [0] } retured [28
]
PWRAP_DEBUG(29946) - pwrap_init: Initialize pam_wrapper
PWRAP_DEBUG(29946) - pwrap_init: Copy /usr/lib/x86_64-linux-gnu/libpam.so.0.83.1 to /tmp/pam.h/lib/libpam.so.0
PWRAP_DEBUG(29946) - copy_confdir: Copy config files from /home/mathieu/src/git.samba.org/samba/st/tmp/pam_services to /tmp/pam.h
PWRAP_DEBUG(29946) - pwrap_init: Successfully initialized pam_wrapper
command: /home/mathieu/src/git.samba.org/samba/python/samba/tests/test_pam_winbind_options.sh python /home/mathieu/src/git.samba.org/samba/bin/default/third_party/pam_wrapper/libpam-wrapper.so $SERVER $USERNAME $PASSWORD newp at ssword0 'try_authtok' 2>&1  | /home/mathieu/src/git.samba.org/samba/selftest/filter-subunit --fail-on-empty --prefix="samba.tests.pam_winbind with options 'try_authtok'(local)." --suffix="(ad_member)"
expanded command: /home/mathieu/src/git.samba.org/samba/python/samba/tests/test_pam_winbind_options.sh python /home/mathieu/src/git.samba.org/samba/bin/default/third_party/pam_wrapper/libpam-wrapper.so LOCALADMEMBER root loCalMemberPass newp at ssword0 'try_authtok' 2>&1  | /home/mathieu/src/git.samba.org/samba/selftest/filter-subunit --fail-on-empty --prefix="samba.tests.pam_winbind with options 'try_authtok'(local)." --suffix="(ad_member)"
ERROR: Testsuite[samba.tests.pam_winbind with options 'try_authtok'(local)(ad_member)]
REASON: Exit code was 1

 errors[1
```


More information about the samba-technical mailing list