Skip to content

pam_mkhomedir not handled during Dropbear session #421

@sefabre

Description

@sefabre

We are using Dropbear in a Scarthgap Yocto image (version 2022.83). Our system includes the following configuration in /etc/pam.d/common-session:

session required pam_mkhomedir.so skel=/etc/skel/ umask=0022

When connecting via SSH using Dropbear, we encounter the following error:

Failed chdir '/home/admin': No such file or directory

The home directory is expected to be automatically created by pam_mkhomedir.so, but this does not occur when using Dropbear. However, the directory is correctly created when using OpenSSH or when logging in via the local console.
We have also tested moving the pam_mkhomedir.so line to different PAM configuration files (/etc/pam.d/login, common-account, common-session, and dropbear) without success. In Yocto, pam_start seems to be invoked with /etc/pam.d/dropbear file.

This leads us to the following questions:

  • Does Dropbear manage PAM sessions properly (given that Yocto configures common-auth and common-account by default)?
  • Is there a way to enable pam_mkhomedir.so functionality with Dropbear, other than pre-creating the home directory?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions