Dr. Jochen Keutel Unternehmensberatung
pam_mkhomedir for Solaris
Several login scenarios on Unix/Linux have the problem
that the home directory of an user doesn't exist when
he logs in the first time. Examples are the use of NIS-LDAP
A nice solution for this problem is the use of the
module pam_mkhomedir. It's part of the Linux-PAM
and does exactly what you expect it to do: It creates home directories
(using skeleton definitions (/etc/skel)).
The current version of PAM is 0.80.
The problem of former versions (0.77, 0.78) that pam_mkhomedir.c didn't compile on Solaris are gone:
You can compile it "as is".
This seems to work; use it at your own risk.
- get PAM tar.gz file
- gzip -c -d *.gz|tar xvf -
- cd Linux-PAM-0.80/modules/pam_mkhomedir
- PATH=/usr/local/bin:/usr/ccs/bin:$PATH;export PATH
- (to make sure that gcc from /usr/local/bin and the Solaris linker /usr/ccs/bin/ld are used)
- gcc -c -g -O2 -D_REENTRANT -DPAM_DYNAMIC -Wall -fPIC -I../../libpam/include
-I../../libpamc/include -I../pammodutil/include pam_mkhomedir.c
- ld -o pam_mkhomedir.so -B dynamic -G -lc pam_mkhomedir.o
Binaries for Solaris 8 (should work for 9 and 10 as well):
|Dr. Jochen Keutel
||Wusterhausener Str. 8
||Telefon: (030) 678 19189
||Mobil: (0177) 6572720
||Fax: (0721) 151 25 69 38
Last update: 9th August, 2005