OBJECTIVE: user account on all systems, .profile, .bashrc, .History, .ssh/authorized_keys for passwordless login from each system back to yours - test with last 2 line in table below - note any corrections in blocks. |
change .1xx to the correct IP octet |
|
adamin |
mcd |
shogun |
terry |
capt |
change “luser” to your userid |
john |
jake |
andrew |
iori |
terry |
capt |
|
10.10.10.124 |
10.10.10.113 |
10.10.10.114 |
10.10.10.125 |
10.10.10.116 |
10.10.10.1xx |
|
|
|
|
|
|
|
CHECK/CORRECT: /etc/passwd - luser:x:10x:1:luser:/export/home/luser:/usr/bin/bash |
x |
x |
x |
x |
x |
x |
CREATE: vi .profile: . ./.bashrc |
|
|
|
|
|
|
http://johnmeister.com/linux/Notes/bashrc-simple.html (VERIFY PS1, PATH and HISTFILE) |
|
|
|
|
|
|
mkdir .History |
x |
x |
x |
x |
x |
x |
mkdir .ssh ; chmod 700 .ssh |
x |
x |
x |
x |
x |
x |
ssh-keygen -t rsa -N ' ' ; cp id_rsa.pub id_rsa.1xx (this creates and copies for distribution the public key) |
|
|
|
|
|
|
ssh luser@10.10.10.XX ; yes ; pa$$w0rd (this creates the ~/.ssh/known_hosts file) |
|
|
|
|
|
|
scp id_rsa.1xx luser@10.10.10.xx:/export/home/luser/.ssh |
|
|
|
|
|
|
cd .ssh ; cat id_rsa.1xx >> authorized_keys |
|
|
|
|
|
|
ssh luser@10.10.10.1xx w (test without luser@ - should work as user accounts are the same) |
|
|
|
|
|
|
create file that lists all system IP's, then create script to display uptime for each, hint: ssh 10.10.10.124 uptime ; ssh 10.10.10.113 uptime ... |
|
|
|
|
|
|
useful - specialized commands |
COMMAND |
echo "\n### $x (`ssh $x uname -r` on `ssh $x uname -i | awk -F, '{print $2}'`) ###" | tee -a $LOG |
cat /etc/ssh/sshd_config | grep -v ^# | grep -v ^$ |
find . -type f -exec grep -i USSERB00021 {} \; |
find . -user oracle | xargs chgrp 15 |
find . -xdev -type f -size +10000 -exec ls -al {} \; |
format </dev/null | grep EMC | awk '{print $2" "$4" "$5}' > disks ; vxdisk path | grep EMC >> disks ; sort disks |
iostat -xnpm |
metareplace -e d1 c1t1d0s1 |
metastat | grep State | grep -v Dbase |
pkgadd -d gnuplot-4.0.0-sol9-sparc-local (datastream package add) |
ps -ef | grep XXXX | grep -v root | awk '{print $2}' | xargs kill |
scp knowles:/root/classnotes.txt /home/meister/ |
/EMC106/sol9_404/Solaris_9/Tools/add_install_client -i 54.24.150.85 -e "0:3:ba:8c:3f:a1" sunbreak SUNW,Sun-Fire-V490 |
/usr/ccs/bin/make from /var/yp/ (Makefile location) |
/usr/local/bin/tar -cf - * | (cd /EMC120 && /usr/local/bin/tar -xvf - ) |
/usr/local/bin/tar -cf - prodRNAI | (cd /vol01 && /usr/local/bin/tar -xvf - ) |
/usr/sbin/cfgadm -c configure c10 |
/usr/sbin/lofiadm |
/usr/sbin/lofiadm -a /support/Software/Veritas/VM/VM40disk1.iso |
/usr/symcli/bin/symlmf 3A61-6044-C190-0196 |
{10} ok boot net - install |
>--> chmod 4111 sudo ; ---s--x--x 1 root root 97596 Feb 8 2003 sudo |
BTU= Volts x Amps x 3.41 or WATTS x 3.41 |
cat LX ; for x in `cat LX`; do ssh $x uname -a; done |
cd .ssh ; ssh-keygen -b 1024 -t rsa -N '' ; cp id_rsa identity |
cd /EMC106/SETUP/CONFIG_SOURCE/PKGS/ ; pkgadd -d . SFWtop |
chown -R oracle:dba u02 u03 u04 u05 |
crontab 2>&1 >/dev/null |
dd if=<imag.iso> of=/dev/rmt/1 bs=64k ; mt -f /dev/rmt/1 fsf 1 /dev/rmt/0 |
df -k | egrep -ve 'filernc|dmpfs|swap|proc|mnttab|fd|cdrom|ingrid|kodak' |
echo "\n### $x (`rsh $x uname -r` on `rsh $x uname -i | awk -F, '{print $2}'`) ###" | tee -a $LOG |
find . -atime +3 -exec rm -rf {} \; |
find . -type f -name '--' -exec rm -f {} \; |
find . -xdev -type f -name ssd.conf -exec ls -al {} \; |
find /<dir> -user dba | xargs chgrp 15 |
find . -name README -exec mv {} README.html \; |
for x in `cat H9`; do ssh $x uname -a; done |
fsck -y -o b=10136224 /dev/md/rdsk/d50 |
fsck -y -o b=200992 /dev/md/rdsk/d50 |
fsck -y -o b=32 /dev/md/rdsk/d50 |
grep -v '^#' $x | grep -v '^[ ]*$' ## displays ONLY uncommented lines in "$x" |
iostat -xtc 5 2 /dev/md/rdsk/d18 |
ll /dev/lofi/1 |
metadb -a -c 2 c1t2d0s0; metainit -f d20 1 1 c1t2d0s0 ; mkdir /build ; newfs /dev/md/rdsk/d20 ; vfstab; mount /build |
mkdir /mnt/iso |
mount -F hsfs -o ro /dev/lofi/1 /mnt/iso |
mount -o loop -t iso9660 filename.iso /mnt/iso |
newfs -N /dev/md/rdsk/d50 |
perl -pi -e 's/oracle.*//g' /etc/passwd (creates blank line) |
perl -pi -e 's/resolver.*//s ; s/oracle.*//s' pword (removes the line with resolver and does not leave a blank line) |
perl -pi -e 's/oracle.*//s' pword (removes blank line - single replacement) |
perl -pi -e 's/^$/#/s ; s/^#.*//s' pword (removes blank line as well) |
perl -pi -e 's/^$/BLANK/s ; s/^BLANK.*//s' pword (removes blank lines) |
perl -pi -e 's/^[ ]*$/#/s ; s/^#.*//s' pword (removes blank line with spaces or tabs) |
pkgadd -d . SFWemacs SFWgcmn SFWsudo SFWungif SFWxaw3d SFWncur |
prtdiag -v |
ps -e | grep defunct | awk '{print "kill " $1}' > /tmp/kill ; sh /tmp/kill |
ps -ef | grep resolv | awk '{print $2]' | xargs kill -9 |
share -F nfs -o rw,root=wolf:penguin1:penguin2,anon=0 /EMC106/penguin2tmp (in /etc/dfs/dfstab file) |
showmount -e filernc |
sort /etc/passwd /etc/shadow | cut -f1 -d: | uniq -u |
ssh gracie "(tar cfb - 20 -C /EMD136 u00 )" | tar -xfbB - 20 |
sudo - setuid: chmod 4111 sudo |
|
REPLACE TEMP LICENSE: |
cp /etc/vx/licenses/lic/*.vxlic /var/tmp |
rm /etc/vx/licenses/lic/*.vxlic |
/opt/VRTS/bin/vxlicinst 3JPE-CMRZ-UGRW-KHSL-PPZP-CCC /opt/VRTS/bin/vxlicrep |
manually enter license: 3JPE-CMRZ-UGRW-KHSL-PPZP-CCC |
vxlicrep |
|
VXMEND |
vxprint -ht |
v EMC124 - DISABLED ACTIVE 848400384 SELECT - fsgen |
pl EMC124-01 EMC124 DISABLED RECOVER 848401920 CONCAT - RW |
vxmend -o force off EMC124-01 |
vxmend -o force on EMC124-01 |
vxmend fix clean EMC124-01 |
vxvol -g dg124 start EMC124 |
mount /EMC124 UX:vxfs mount: ERROR: /dev/vx/dsk/dg124/EMC124 is corrupted. needs checking |
fsck -F vxfs /dev/vx/rdsk/dg124/EMC124, log replay in progress, replay complete - marking super-block as CLEAN |
mount /EMC124... happiness occurred |
|
VXDG IMPORT |
vxdctl enable |
vxdg deport dg120 |
vxdg import dg120 |
vxvol -g dg120 startall |
mount /EMC120 |
|
1) format (label, check slice info) 2) metaset -s EMD144 -a -h watch 3) metaset -s EMD144 -a disk1 disk2 disk3 disk4 (c#t#d#) 4) metainit -s EMD144 d3 1 4 disk1s# disk2s# disk3s# disk4s# (c#t#d#s#) *(NOTE s#) 5) newfs -v /dev/md/EMD144/rdsk/d3 6) vi |
metaset -s EMD122 -t |
|
KILL VEA |
/etc/init.d/isisd stop |
proxy - 54.23.228.195:8080 unixmeister dpifns / 800.872.4786 31532191 6520 |
Sun memory p/n's: 501-5401 - 256M, 501-5030 - 512M |
|
--> more tar_clbr.sh #!/usr/bin/ksh # to create a DB tarball (Les script) # tar and compress current directory contents /usr/local/bin/tar cvf - ./* | /usr/local/bin/gzip -9 -c > /u00/expfiles/jwttest_V32_data.tar.gz |