Force PAM to create new user home folder in Debian Linux
I want to setup the GDM to log by a RADIUS server. I have been trying this from the past few days but couldn’t achieve it yet. The problem is, the logging only works if the user already has a local home folder. In that case I have to configure or create a user home folder using pam_mkhomedir but no success at all.
Re: Force PAM to create new user home folder in Debian Linux
Did you try following command in /etc/pam.d/system-auth:
Code:
session optional pam_mkhomedir.so
As far as I know that the Pluggable Authentication Modules library, or PAM, is actually a collection of shared libraries. These shared libraries are used to control how users login to systems. By the use of number of modules previously installed or previously available, we can restrict user access to systems in different ways. You can also customize the login behavior by the use of several utility modules.
Re: Force PAM to create new user home folder in Debian Linux
For the PAM, it does not matter where you place it. By the use of control fields it can be determine how the action will play out. In your case, the problem is an "optional" module filed to execute and it happens if there only one module inside the stack. It shouldn’t because it is a session stack. But if this really happened you need to manually place it in the appropriate stack.
Re: Force PAM to create new user home folder in Debian Linux
I think that if there is no home directory, then it will be automatically created when we try to login to that particular account.
Code:
root@lappy:~# su - pamtest
Creating directory '/home/pamtest'.