• Home directory created automatically when logging in, unintentionally

    From Christoph Pleger@3:633/10 to All on Thursday, April 23, 2026 11:00:02
    Subject: Home directory created automatically when logging in, unintentionally so far

    Hello,
    On a Debian 13 machine, I created a new user, without creating the home directory at the same time, as the intention is that at every login,
    first pam_exec.so is used to completely remove the home directory and
    then pam_mkhomedir.so to create it again.
    After first login - there is absolutely no doubt that the home
    directory did not exist before login - I discovered that the home
    directory had been created somehow, though I did not even add
    pam_mkhomedir to the PAM stack.
    What is it that may have created the home directory?
    Regards
    Christoph


    --- PyGate Linux v1.5.14
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From didier gaumet@3:633/10 to All on Thursday, April 23, 2026 11:50:01
    Subject: Re: Home directory created automatically when logging in, unintentionally so far

    Le 23/04/2026 … 10:48, Christoph Pleger a ‚crit˙:
    Hello,

    On a Debian 13 machine, I created a new user, without creating the home directory at the same time, as the intention is that at every login,
    first pam_exec.so is used to completely remove the home directory and
    then pam_mkhomedir.so to create it again.

    After first login - there is absolutely no doubt that the home
    directory did not exist before login - I discovered that the home
    directory had been created somehow, though I did not even add
    pam_mkhomedir to the PAM stack.

    What is it that may have created the home directory?

    Regards
    Christoph

    Hello,

    (I am not at all familiar with this subject)

    A possible candidate would be pam_oddjob_mkhomedir.so: https://oneuptime.com/blog/post/2026-03-02-how-to-set-up-home-directory-creation-for-ad-users-on-ubuntu/view

    --- PyGate Linux v1.5.14
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)