Register
Login
Contribute
Subscribe
RSS
News
FAQForge
ISPConfig
Subscribe
Contribute
Forums
Howtos
Navigation
Howtos
Linux
Android
CentOS
Debian
Fedora
Kernel
Mandriva
PCLinuxOS
SuSE
Ubuntu
Web Server
Apache
Cherokee
Lighttpd
nginx
Backup
Control Panels
ISPConfig
DNS
BIND
MyDNS
PowerDNS
djbdns
Desktop
Email
Anti-Spam/Virus
Postfix
FTP
High-Availability
Lighttpd
Monitoring
MySQL
Programming
C/C++
PHP
Samba
Security
Anti-Spam/Virus
Storage
Virtualization
KVM
OpenVZ
VMware
VirtualBox
Xen
Other
FreeBSD
Commercial
Mini-Howtos
Linux
Apache
Backup
DNS
Errors
FTP
MySQL
Networking
PHP
Postfix
Security
Sendmail
Shell
Other
ISPConfig
Forums
Contribute
Create Content
Subscription
Login
Site Map/RSS Feeds
Facebook
News
Shuttleworth: Still Key to Ubuntu Linux, Open Source, Canonical?
NVIDIA Driver Soon Likely To Support EGL, Mir
OpenMandriva Goes Into Alpha Form, Russian-Based
Quick troubleshooting network bottleneck on Windows (using Open Source)
Linux Shell:Timeout
TypeScript 0.9 arrives with new compiler, support for generics
Nuke plants to keep PDP-11 UNTIL 2050!
Google's JavaScript challenger gains better tools, performance
Red Hat (RHT) Q1 2014 Earnings: Cloud, Storage Lift?
Planetary Annihilation begins its Linux onslaught!
more
Recent comments
Possible boot options for Acer Aspire v3-771g-6485
7 hours 53 min ago
fix for all virtual hosts
12 hours 46 min ago
If you need some more
21 hours 38 min ago
wal_keep_segments too high
22 hours 38 min ago
easier installation
1 day 2 hours ago
ERROR: Connection dropped by IMAP server.
1 day 3 hours ago
Re: Inability to connect with phpmyadmin as directed in tutorial
1 day 7 hours ago
linnux ha on centos6.4
1 day 14 hours ago
Database Connection.
1 day 23 hours ago
Re: Be carefully, if you a new
2 days 56 min ago
Newsletter
Subscribe to HowtoForge Newsletter
and stay informed about our latest HOWTOs and projects.
(To unsubscribe from our newsletter, visit this
link
.)
English
|
Deutsch
|
Site Map/RSS Feeds
|
Advertise
HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials
>
Linux Forums
>
Desktop Operation
Force PAM to create user home folder if it already not exists
User Name
Remember Me?
Password
Register
FAQ
Members List
Social Groups
Calendar
Search
Today's Posts
Mark Forums Read
Do you like HowtoForge? Please consider supporting us by
becoming a subscriber
.
Page 2 of 2
<
1
2
Thread Tools
Display Modes
#
11
15th November 2011, 13:28
lorens
Junior Member
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
I have already debugging enabled, tells authentication succeeded.
lorens
View Public Profile
Send a private message to lorens
Find all posts by lorens
Sponsored Links
#
12
15th November 2011, 14:04
lorens
Junior Member
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
I'm trying another configuration. See below.
/etc/pam.d/common-session (at top)
session sufficient pam_mkhomedir.so skel=/home/formacio umask=0022
/etc/pam.d/gdm
auth sufficient pam_radius_auth.so debug
auth requisite pam_nologin.so
auth sufficient pam_succeed_if_so.so
@include common-auth
auth optional pam_gnome_keyring.so
account sufficient pam_radius_auth.so
@include common-account
session required pam_limits.so
#session required pam_mkhomedir.so skel=/home/formacio umask=0022
@include common-session
session optional pam_gnome_keyring.so auto_start
@include common-password
The result is that trying to log in with an local user I see at auth.log pam_mkhomedir(PLUGIN:session): Home directory /home/LOCAL_USER already exists
If I try a RADIUS_USER auth.log tells nothing about pam_mkhomedir.
Any idea?
lorens
View Public Profile
Send a private message to lorens
Find all posts by lorens
#
13
15th November 2011, 14:11
nbhadauria
Member
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
manually create home directory for RADIUS_USER and then try..
The Following User Says Thank You to nbhadauria For This Useful Post:
lorens
 (16th November 2011)
nbhadauria
View Public Profile
Send a private message to nbhadauria
Find all posts by nbhadauria
#
14
16th November 2011, 10:02
lorens
Junior Member
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
This is working, but it's not an acceptable solution.
Because I don't know all usernames that can login at the machine, so I have to create home directories dynamically.
Last edited by lorens; 16th November 2011 at
12:17
.
lorens
View Public Profile
Send a private message to lorens
Find all posts by lorens
#
15
18th November 2011, 10:09
lorens
Junior Member
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
I'm posting the configuration files:
############# /etc/pam.d/common-account ####################
account sufficient pam_radius_auth.so
session required pam_mkhomedir.so
account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
account requisite pam_deny.so
account required pam_permit.so
############# /etc/pam.d/common-auth #######################
auth [success=1 default=ignore] pam_unix.so nullok_secure
auth requisite pam_deny.so
auth required pam_permit.so
############# /etc/pam.d/common-session #######################
session [default=1] pam_permit.so
session requisite pam_deny.so
session required pam_permit.so
session required pam_mkhomedir.so
session required pam_unix.so
session optional pam_ck_connector.so nox11
############# /etc/pam.d/gdm #######################
auth sufficient pam_radius_auth.so debug
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 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=0022
@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
############# /etc/pam.d/login #######################
auth required pam_securetty.so
auth requisite pam_nologin.so
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
session required pam_env.so readenv=1
session required pam_env.so readenv=1 envfile=/etc/default/locale
# Standard Un*x authentication.
@include common-auth
auth optional pam_group.so
session required pam_limits.so
session optional pam_lastlog.so
session optional pam_motd.so
session optional pam_mail.so standard
# Standard Un*x account and session
@include common-account
@include common-session
@include common-password
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
################################################## ##########
I hope this will help.
lorens
View Public Profile
Send a private message to lorens
Find all posts by lorens
#
16
18th November 2011, 15:39
nbhadauria
Member
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
I have done same thing but with ldap not with radius and don't really have a setup where i can try this.
Still if you like give it a try.
Use a new formatted desktop and use only this configuration ..
vi /etc/pam.d/common-auth
session required pam_limits.so
session required pam_unix.so
session optional pam_radius_auth.so
session required pam_mkhomedir.so skel=/etc/skel
session optional pam_foreground.so
The Following User Says Thank You to nbhadauria For This Useful Post:
lorens
 (22nd November 2011)
nbhadauria
View Public Profile
Send a private message to nbhadauria
Find all posts by nbhadauria
#
17
22nd November 2011, 14:06
lorens
Junior Member
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
This way it's not working.
I already notice that the real problem is that accounting/session is failing because the radius user has not an entry at `/etc/passwd`
I'm currently trying to do adduser by `libpam_script.so` plugin. Maybe it's the solution
lorens
View Public Profile
Send a private message to lorens
Find all posts by lorens
#
18
29th November 2011, 13:24
lorens
Junior Member
Join Date: Nov 2011
Posts: 11
Thanks: 7
Thanked 0 Times in 0 Posts
Finally I have solved the problem by using `pam_script` to execute `adduser` before entering the gdm session.
Thanks all.
lorens
View Public Profile
Send a private message to lorens
Find all posts by lorens
#
19
29th November 2011, 17:54
nbhadauria
Member
Join Date: Aug 2010
Location: New Delhi, India
Posts: 79
Thanks: 1
Thanked 13 Times in 13 Posts
That's great ..
Do upload your solution ..
nbhadauria
View Public Profile
Send a private message to nbhadauria
Find all posts by nbhadauria
Page 2 of 2
<
1
2
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
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 Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
Linux Forums
HOWTO-Related Questions
Installation/Configuration
Server Operation
Desktop Operation
Kernel Questions
Programming/Scripts
Technical
Suggest HOWTO
ISPConfig 3
General
Installation/Configuration
ISPConfig 3 Priority Support
Plugins/Modules/Addons
Tips/Tricks/Mods
Feature Requests
Developers' Forum
ISPConfig 2
General
Installation/Configuration
Tips/Tricks/Mods
Feature Requests
Developers' Forum
MyDNSConfig
General
Other Forums
Smalltalk
Forum Suggestions
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
14:03
.
Contact Us
-
HowtoForge - Linux Howtos and Tutorials
-
Archive
-
Top
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Recent comments
7 hours 53 min ago
12 hours 46 min ago
21 hours 38 min ago
22 hours 38 min ago
1 day 2 hours ago
1 day 3 hours ago
1 day 7 hours ago
1 day 14 hours ago
1 day 23 hours ago
2 days 56 min ago