[CentOS] kickstart and logins.def question
Jay Leafey
jay.leafey at mindless.com
Sat Jan 2 16:07:15 UTC 2010
Kwan Lowe wrote:
> On Fri, Jan 1, 2010 at 11:02 AM, Kwan Lowe <kwan.lowe at gmail.com> wrote:
>
> Still having issues with this... Here's the relevant line from my kickstart:
>
> authconfig --enableshadow --enablemd5 --enableldap
> --enableldapauth --ldapserver=ldapserver.digitalhermit.com
> --ldapbasedn=dc=digitalhermit,dc=com --enablecache
>
>
> And the sed scripts to enable the pieces that don't seem to have a
> passable keyword to change:
> %post
> yum -y groupinstall xfce
>
> sed -i -e "s/^\(USEMKHOMEDIR=\).*$/\1\yes/" /etc/sysconfig/authconfig
> sed -i -e "s/^\(USEPAMACCESS=\).*$/\1\yes/" /etc/sysconfig/authconfig
> sed -i -e "s/^\(USELOCAUTHORIZE=\).*$/\1\yes/" /etc/sysconfig/authconfig
>
> Unfortunately this doesn't work. When I login immediately after the
> initial reboot it authenticates properly but complains that the user
> home directory does not exist. If I then go in as root and run
> system-config-authentication and change one item, it will start
> creating the home directories.
>
> <SNIP>
>
> Anyone can shed light on why it does not auto-create the home
> directories on initial boot?
I think the issue here is that the change has to be made in both the
authconfig file and in the /etc/pam.s/system-auth file. Just changing
/etc/sysconfig/authconfig does not do it. You could use something like
the following in your kickstart file instead of all the sed commands:
/usr/sbin/authconfig --enablemkhomedir --enablelocauthorize \
--enablepamaccess --update
This will make the changes you specified to /etc/sysconfig/authconfig
AND update any other files affected by the change. I'm a lazy bum and
it just seems easier and cleaner to me.
Just a thought!
--
Jay Leafey - Memphis, TN
jay.leafey at mindless.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3274 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20100102/d613be11/attachment.bin>
More information about the CentOS
mailing list