JET install root config

From JetResources
Jump to navigation Jump to search

Parent

install_root_config

#!/usr/bin/ksh

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 root
cp -r .ssh .cshrc .hushlogin /

grep -v ^root: /etc/passwd > /tmp/passwd.noroot
echo "root:x:0:0:Super-User:/:/bin/tcsh" > /etc/passwd
cat /tmp/passwd.noroot >> /etc/passwd
chmod 644 /etc/passwd
chmod 644 /etc/hosts
chmod 644 /etc/rpc
chmod 644 /etc/services
chmod 644 /etc/group
chmod 644 /etc/syslog.conf
echo "ClientAliveInterval 100" >> /etc/ssh/sshd_config