Skip to content

PAM out should fail with a CompatError #720

Description

@adiroiban

Look why PAM was still attempted on Alpine


          After installing SFTPPlus to launch as root, with default configuration (and adding `alpinista` as the OS group allowed for file transfer), I get this error below.  (This is default Alpine Linux with no PAM.)
2025-03-31T14:51:54+03:00 20059 Process Unknown 127.0.0.1:51898 Internal error. Failed to authenticate "alpinista". Traceback: <class 'AttributeError'>: Symbol not found: pam_start
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:209:maybeDeferred
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:130:requestAvatarId
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:2256:unwindGenerator
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:2168:_cancellableInlineCallbacks
--- <exception caught here> ---
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:2000:_inlineCallbacks
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:208:_requestAvatarId
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:337:_authenticate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/os.py:401:authenticate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/os.py:597:_validateOSUser
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:880:validate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:904:_validate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:928:_validatePassword
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:1015:_validateOSPassword
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:1038:_validateWithPAMOnly
/opt/sftppath/lib/python3.12/site-packages/chevah_compat/unix_users.py:225:pamWithUsernameAndPassword
/opt/sftppath/lib/python3.12/site-packages/pam/__init__.py:130:authenticate
/opt/sftppath/lib/python3.12/site-packages/pam/__internals.py:206:__init__
/opt/sftppath/lib/python3.12/ctypes/__init__.py:392:__getattr__
/opt/sftppath/lib/python3.12/ctypes/__init__.py:397:__getitem__
2025-03-31T14:51:54+03:00 40000 https-1 Unknown 127.0.0.1:51898 Unauthorized request for "/__chsps__/login". Authentication failed. Contact your administrator for more details.
2025-03-31T14:52:27+03:00 20059 Process Unknown 127.0.0.1:51898 Internal error. Failed to authenticate "alpinista". Traceback: <class 'AttributeError'>: Symbol not found: pam_start
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:209:maybeDeferred
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:130:requestAvatarId
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:2256:unwindGenerator
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:2168:_cancellableInlineCallbacks
--- <exception caught here> ---
/opt/sftppath/lib/python3.12/site-packages/twisted/internet/defer.py:2000:_inlineCallbacks
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:208:_requestAvatarId
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:337:_authenticate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/os.py:401:authenticate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/os.py:597:_validateOSUser
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:880:validate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:904:_validate
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:928:_validatePassword
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:1015:_validateOSPassword
/opt/sftppath/lib/python3.12/site-packages/chevah/server/authentication/credential_checker.py:1038:_validateWithPAMOnly
/opt/sftppath/lib/python3.12/site-packages/chevah_compat/unix_users.py:225:pamWithUsernameAndPassword
/opt/sftppath/lib/python3.12/site-packages/pam/__init__.py:130:authenticate
/opt/sftppath/lib/python3.12/site-packages/pam/__internals.py:206:__init__
/opt/sftppath/lib/python3.12/ctypes/__init__.py:392:__getattr__
/opt/sftppath/lib/python3.12/ctypes/__init__.py:397:__getitem__

Originally posted by @dumol in https://github.com/chevah/server/issues/7042#issuecomment-2766001056

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions