1

I have setup pam_mkhomedir so that users home directories are automatically created at their first login. But I also want to create directories on a different place like this.

  • /home/username (pam_mkhomedir can make this directory)
  • /scratch/username

As far as I know, having a script in /etc/profile.d can't manage this because normal users don't have write-permission on /scratch.

Does anyone know how to make this happen?

Thanks in advance.

1
  • An suid script in /etc/profile?
    – Zoredache
    Mar 12, 2013 at 23:13

1 Answer 1

1

You can use pam_exec to trigger a script at login. In the script you can create the /scratch/username folder if it does not exist.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .