# Post Shell Script for Solaris Jumpstart Install
# set root Password ( copy from /etc/shadow)
# and enter domain name to /etc/inet/hosts
#!/bin/sh
PASSWD=Cb8aoSNHNbIBM #===> root
domain=wihok.blogspot.com
####### password for root #######
cp /a/etc/shadow /a/etc/shadow.orig
nawk -F: '{
if ( $1 == "root" )
printf"%s:%s:%s:%s:%s:%s:%s:%s:%s\n",$1,passwd,$3,$4,$5,$6,$7,$8,$9
else
printf"%s:%s:%s:%s:%s:%s:%s:%s:%s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9
}' passwd="$PASSWD" /a/etc/shadow.orig > /a/etc/shadow
rm -f /a/etc/shadow.orig
sed -e 's/0 # root/1 # root/' ${SI_SYS_STATE} > /tmp/state.$$
mv /tmp/state.$$ ${SI_SYS_STATE}
###### set name service to NONE
cp /a/etc/nsswitch.files /a/etc/nsswitch.conf
###### disable auto shutdown
touch /a/noautoshutdown
###### edit /etc/inet/hosts
sed "/loghost/d" /a/etc/inet/hosts > /a/etc/inet/hosts.tmp
grep loghost /a/etc/inet/hosts awk '{print $1"\t" $2"\t" $3"\t test.domain.com"}' >> /a/etc/inet/hosts.tmp
mv /a/etc/inet/hosts.tmp /a/etc/inet/hosts
Friday, December 7, 2007
JumpStart Post-Script
Posted by wihok at 5:28 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment