Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Desktop Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th November 2011, 12:38
lorens lorens is offline
Junior Member
 
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
Default 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 pam_mkhomedir.so 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:

#%PAM-1.0
auth sufficient pam_radius_auth.so
auth requisite pam_nologin.so
#auth sufficient pam_env.so readenv=1
#auth sufficient pam_env.so readenv=1 envfile=/etc/default/locale
auth sufficient pam_succeed_if.so
#auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
@include common-auth
auth optional pam_gnome_keyring.so
account sufficient pam_radius_auth.so
@include common-account
#session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
#session required pam_limits.so
session sufficient pam_mkhomedir.so skel=/home/formacio umask=0
@include common-session
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
session optional pam_gnome_keyring.so auto_start
@include common-password


Thanks
Reply With Quote
Sponsored Links
  #2  
Old 14th November 2011, 13:33
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
Default

try this..

vi /etc/pam.d/common-session

session required pam_mkhomedir.so skel=/home/formacio
Reply With Quote
The Following User Says Thank You to nbhadauria For This Useful Post:
lorens (14th November 2011)
  #3  
Old 14th November 2011, 13:52
lorens lorens is offline
Junior Member
 
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
Default

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?
Reply With Quote
  #4  
Old 14th November 2011, 14:55
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
Default

then my friend can you share some more information on which OS are trying to login and what configuration you are using ..
Reply With Quote
The Following User Says Thank You to nbhadauria For This Useful Post:
lorens (15th November 2011)
  #5  
Old 15th November 2011, 09:43
lorens lorens is offline
Junior Member
 
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
Default

I'm using Ubuntu 10.04.3 and gmd 2.30.2

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

Ask for any more data needed.

Last edited by lorens; 15th November 2011 at 11:38.
Reply With Quote
  #6  
Old 15th November 2011, 12:00
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
Default

have you tried like this ..

vi /etc/pam.d/common-session

session required pam_limits.so
session required pam_unix.so
session optional pam_radius_auth.so
session required pam_mkhomedir.so skel=/home/formacio
session optional pam_foreground.so

and reboot your system ..
Reply With Quote
The Following User Says Thank You to nbhadauria For This Useful Post:
lorens (15th November 2011)
  #7  
Old 15th November 2011, 12:10
lorens lorens is offline
Junior Member
 
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
Default

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

Last edited by lorens; 15th November 2011 at 12:20.
Reply With Quote
  #8  
Old 15th November 2011, 12:23
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
Default

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 pam_radius_auth.so
Reply With Quote
The Following User Says Thank You to nbhadauria For This Useful Post:
lorens (15th November 2011)
  #9  
Old 15th November 2011, 13:08
lorens lorens is offline
Junior Member
 
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
Default

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?

Last edited by lorens; 15th November 2011 at 13:10.
Reply With Quote
  #10  
Old 15th November 2011, 13:24
nbhadauria nbhadauria is offline
Member
 
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
Send a message via Skype™ to nbhadauria
 
Default

use debug at the end of the line like..

vi /etc/pam.d/common-auth

auth sufficient pam_radius_auth.so debug

did you find some thing else in the log other then this ??
Reply With Quote
The Following User Says Thank You to nbhadauria For This Useful Post:
lorens (15th November 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Server Is Sending Spam. How Do I Block This? LordJ Server Operation 1 7th July 2011 19:34
user has no rights on his own home folder? notze General 1 20th May 2011 12:20
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Vhosts...conf not synced to changes crypted General 50 24th April 2010 00:54
New FTP Users can't login pyropoptrt General 21 12th June 2009 13:13


All times are GMT +2. The time now is 03:16.


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