Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ejabberd does not fill out pam rhost field #2858

Open
dorchain opened this issue Apr 13, 2019 · 2 comments
Open

ejabberd does not fill out pam rhost field #2858

dorchain opened this issue Apr 13, 2019 · 2 comments
Assignees

Comments

@dorchain
Copy link

Hello,

as of version 18.12.1, ejabberd does not place anything in the rhost field. Easiest check is with
pam_warn.

Mar 20 13:27:46 Redstar epam: pam_warn(ejabberd:auth): function=[pam_sm_authenticate] flags=0 service=[ejabberd] terminal=[] user=[] ruser=[] rhost=[]

The corresponding functionality in the erlang-p1-pam Package is available
for a while (cfr #1591).

As it is in the ejabberd.log, it should as well be provided to the pam
stack, as it is not a local service (like e.g. cron)

@zinid
Copy link
Contributor

zinid commented Apr 23, 2019

Indeed, ejabberd doesn't fill this field.
I'm a bit clueless, what should be in that field?

@zinid zinid self-assigned this Apr 23, 2019
@dorchain
Copy link
Author

Indeed, ejabberd doesn't fill this field.
I'm a bit clueless, what should be in that field?

Sorry, I overlooked the question.

In my understanding of PAM, the RHOST field contains the remote host from which the connection was initiated.

So for a client connecting to ejabberd to be authenticated with pam, we need:

  • PAM_SERVICE: ejabberd (fine)
  • PAM_USER: the local user name (not set)
  • PAM_RHOST: the remote host (ip addresse or FDQN, not set)

PAM_RUSER is the remote user name on the client machine, in case it is different from the local user name we are trying to authenticate, and optional. (For me I do not care; besides it would be hard the get). PAM_TERMINAL makes sense for ttys. If anything use the same value as for PAM_SERVICE, or just leave it empty.

Besides I would like to point to The Linux-PAM Application Developers' Guide specifically chapter 3.1.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants