%post in ubuntu kickstart
stephen mulcahy
stephen.mulcahy at deri.org
Thu Mar 26 14:18:53 GMT 2009
Finally solved with the following %post script (which generates a
run-once script invoked by the server on first boot),
(note the slashes needed in the password hash - these are necessary to
prevent the shell from mangling the password)
%post --interpreter=/bin/bash
# add stuff to be run once on first boot
cp /etc/rc.local /etc/rc.local.orig
cat << EOF > /etc/rc.local
#!/bin/sh -e
#
# rc.local
useradd -p '\$1\$XXXX.XXX\$AAAAbbbbCCCCdddd' -m -s /bin/bash -G admin auser
cp /etc/rc.local /etc/rc.local.run-once
cat /etc/rc.local.orig > /etc/rc.local
exit 0
EOF
--
Stephen Mulcahy, DI2, DERI, National University of Ireland, Galway,
IDA Business Park, Lower Dangan, Galway, Ireland
http://di2.deri.ie http://webstar.deri.ie http://sindice.com
More information about the Ubuntu-installer
mailing list