pam_mkhomedir for Solaris?

Hi Folks

I am trying to implement automatic creation of Home directory's when a new user logs in using the pam_mkhomedir.so module.

I managed to download the binary pam_mkhomedir.so from Dr. Jochen Keutel - pam_mkhomedir for Solaris and copied it into /usr/lib/security.

I added the following entry in /etc/pam.conf :

other session required pam_mkhomedir.so skel=/etc/skel umask=0022

But i am unable to login and find the following error in /var/adm/messages:

load_modules:can not open module /usr/lib/security/pam_mkhomedir.so
open_module:/usr/lib/security/pam_mkhomedir.so failed:ld.so.1:sshd:fatal wrong elfdata format:elfdata2msb

The pam_mkhomedir is owned by root:bin. It has executable rights.
How do i make this work?

Note - I have downloaded the binary staright from the site. I haven't done any compile.

You downloaded a binary for SPARC while running Solaris on x86. You need to pick the right binary if available otherwise compile it from source.

Ok. Does anybody have a compiled version for x86?

Jilliagre,Can you tell me how you deduced that i have used a SPARC binary on an x86 machine. The site from where i downloaded doesn't seem to give me any indication on that.

Thanks
HG

elfdata2msb means it is big endian, which for Solaris means SPARC.
As the loader can't load it, it must be running on a little endian architecture which means x86.

Thanks,jlliagre.....every post(by experts) in this forum reminds me that i have miles to go before i can call myself an Admin.Thanks for helping me pave.
Can somebody respond to my SOS for pam_mkdir module(compiled) for x86? :smiley:

Did you try following the instruction to compile it from source explained on the web site ?

No. I don't have gcc installed in this machine to compile it. Am thinking of downloading it(gcc),now that the chances of finding a compiled package looks bleak. :cool:

HG

gcc is installed by default on Solaris 10. Did you remove it ?

Yes,You were right.Thanks for the info. I found gcc in /usr/sfw.
Also,i was able to compile and am able to create home directories automatically on login.
But the directory is created in /home.How do i change it to /users as I want my users home directory to be created in /users.

Thanks Again
HG

The module creates a home directory as defined in the user's /etc/passwd or NIS/LDAP equivalent entry. Just create or modify the users accounts for them to have their homedirs in /users.

Thanks jlliagre. I am able to create home directory in /users after changing the home directory of AD users in the UNIX Attributes tab.
You are the best!:smiley:
HG