JET install sysadmin config

From JetResources
Jump to: navigation, search

Parent

install_sysadmin_config

#!/usr/bin/ksh

/usr/sbin/svcadm disable autofs
sleep 3
/usr/sbin/groupadd -g 60006 admin
/usr/sbin/useradd -u 2142 -g admin -d /home/sysadmin -m -s /bin/tcsh -c "Sysadmin User" sysadmin
/bin/passwd -x -1 sysadmin

if [ ! -d "/var/tmp/my_custom" ] ; then
  cd /var/tmp; /bin/tar -xf my_custom.tar
fi

if [ ! -d "/var/tmp/my_custom" ] ; then
  exit
fi

cd /var/tmp/my_custom
cd sysadmin
cp -r .ssh .cshrc .hushlogin /home/sysadmin
chown -R sysadmin:admin /home/sysadmin

grep -v ^sysadmin: /etc/shadow > /tmp/shadow.nosysadmin
echo "sysadmin:PaSsWoRd:13858::::::" > /etc/shadow
cat /tmp/shadow.nosysadmin >> /etc/shadow
chmod 600 /etc/shadow