Difference between revisions of "JET install root config"
Jump to navigation
Jump to search
| Line 4: | Line 4: | ||
#!/usr/bin/ksh | #!/usr/bin/ksh | ||
| − | + | ||
if [ ! -d "/var/tmp/my_custom" ] ; then | if [ ! -d "/var/tmp/my_custom" ] ; then | ||
cd /var/tmp; /bin/tar -xf my_custom.tar | cd /var/tmp; /bin/tar -xf my_custom.tar | ||
fi | fi | ||
| − | + | ||
if [ ! -d "/var/tmp/my_custom" ] ; then | if [ ! -d "/var/tmp/my_custom" ] ; then | ||
exit | exit | ||
fi | fi | ||
| − | + | ||
cd /var/tmp/my_custom | cd /var/tmp/my_custom | ||
cd root | cd root | ||
cp -r .ssh .cshrc .hushlogin / | cp -r .ssh .cshrc .hushlogin / | ||
| − | + | ||
grep -v ^root: /etc/passwd > /tmp/passwd.noroot | grep -v ^root: /etc/passwd > /tmp/passwd.noroot | ||
echo "root:x:0:0:Super-User:/:/bin/tcsh" > /etc/passwd | echo "root:x:0:0:Super-User:/:/bin/tcsh" > /etc/passwd | ||
Latest revision as of 00:08, 11 January 2008
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