HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Desktop Operation (
-   -   Force PAM to create user home folder if it already not exists (

lorens 10th November 2011 13:38

Force PAM to create user home folder if it already not exists
Hi all!

I've been trying to configure gdm to log by a RADIUS server.
I'm done with the auth. But the logging it's only working if the user has already a local home folder. So I'm trying to configure in order to create the user home folder on the fly. The problem is that it's not working...

My /etc/pam.d/gdm file:

auth sufficient
auth requisite
#auth sufficient readenv=1
#auth sufficient readenv=1 envfile=/etc/default/locale
auth sufficient
#auth sufficient user ingroup nopasswdlogin
@include common-auth
auth optional
account sufficient
@include common-account
#session [success=ok ignore=ignore module_unknown=ignore default=bad] close
#session required
session sufficient skel=/home/formacio umask=0
@include common-session
session [success=ok ignore=ignore module_unknown=ignore default=bad] open
session optional auto_start
@include common-password


nbhadauria 14th November 2011 14:33

try this..

vi /etc/pam.d/common-session

session required skel=/home/formacio

lorens 14th November 2011 14:52

It's very rare. I had put that line with a debug option, and trying to log with a non local user at gdm fails but if try a local user by cli auth.log says "the user already has a home directory".

Any suggestions?

nbhadauria 14th November 2011 15:55

then my friend can you share some more information on which OS are trying to login and what configuration you are using ..

lorens 15th November 2011 10:43

I'm using Ubuntu 10.04.3 and gmd 2.30.2

I have added the " sufficient" line at the /etc/pam.d/gdm file (the RADIUS authentication is working well).

Ask for any more data needed.

nbhadauria 15th November 2011 13:00

have you tried like this ..

vi /etc/pam.d/common-session

session required
session required
session optional
session required skel=/home/formacio
session optional

and reboot your system ..

lorens 15th November 2011 13:10

I'm trying that and gdm says something like user account does not exists (same output as always)

nbhadauria 15th November 2011 13:23

run logs..

tail -f /var/log/auth.log

try to run

getent passwd

If didn't work try with ..

vi /etc/pam.d/common-auth

auth sufficient

lorens 15th November 2011 14:08

Before auth.log told nothing insteresting.

Now with the common-auth line tells "PAM unable to resolve symbol: pam_sm_acct_mgmt".

What is the point of executing the getent command?

nbhadauria 15th November 2011 14:24

use debug at the end of the line like..

vi /etc/pam.d/common-auth

auth sufficient debug

did you find some thing else in the log other then this ??

All times are GMT +2. The time now is 17:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.