Unix Dependencies Tips

error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
resolve with:
yum -y install compat-libstdc++-296 compat-libstdc++-33
(compat-libstdc++-33 is the RPM package that contains the libstdc++.so.5. The -296 I added for good measure.)


No package 'glib-2.0' found
No package 'gobject-2.0' found
yum -y install gtk2-devel GConf2-devel libwnck-devel libX11-devel xorg-x11-proto-devel


configure: error: *** No package 'libglade-2.0' found
No package 'libgpod-1.0' found
yum install libglade2-devel
yum install libgpod-devel


configure: error: *** id3tag >= 0.15 lib not found (0.14 will not work!)
downloaded libid3tag from sourceforge and did the source install with typical
./configure
make
make install

configure: error: C++ preprocessor "/lib/cpp" fails sanity check
yum install gcc gcc-cpp gcc-c++

Recover Root Password

First, try this:

Reboot;

For LILO - At the lilo: prompt, type “linux init 1”;

For GRUB -

Hit ESC key after reboot to get the boot prompt

With the default boot highlighted hit the "e" key to edit

Select the line beginning with Kernel and hit "e" key again to edit

add the word "single" to the end of the string with a space between i.e.

kernel /vmlinuz-2.6.9-42.0.10.ELsmp ro root=/dev/VolGroup00/LogVol00 clock=pit single

Then hit "b" to boot into single user mode. If one of those options works, you’ll get a bash shell prompt and may skip the bulleted list below. Otherwise,

  • Insert your boot diskette in the floppy drive or boot cdrom in cd;
  • When you get to the Install or Upgrade? page, type rescue at the boot: prompt and hit enter;
  • When prompted, insert the rescue disk;
  • When it’s finished loading the rescue diskette, you’ll get a bash shell prompt.
  • mkdir /tmp2;

Assuming your hard disk is on /dev/hda1, type “mount -t ext3 /dev/hda1 /repair”; If that fails, you’ll have to improvise. If successful, cd to /repair/etc, and type “cat passwd”: root:Wlkjlk.jo980934:..... ## means you will be editing /repair/etc/passwd root:*:... ## means no editing is required just reboot and use blank password to login root::..... ## means you will be editing /repair/etc/shadow Vi lives in /repair/bin instead of being in your path so do the following: /repair/bin/vi passwd ### substitute passwd with shadow, as necessary. Remove everything between the first two colons of the root passwd entry so it is like: root::... Save the file passwd or shadow with shift-: wq

Edit the file /etc/login.defs so that minimum password length of "0" is allowed

Type “sync” (very important). Hit “^D” to end the bash shell session. The machine should reboot, and you can login as root with no password. Run passwd and enter the new password as soon as possible.

#### Edit /etc/samba/smb.conf as follows ########################################### #======================= Global Settings =====================================
[global] worgroup = PVALENTINO_DOMAIN
server string = Comment of my choice
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/bash
winbind use default domain = yes
password server = PVALENTINO_DC1 PVALENTINO_DC2
realm = PVALENTINO.LAN # server string is the equivalent of the NT Description field server string = PVALENTINO Application Server
# This option is important for security. It allows you to restrict # connections to machines which are on your local network. The # following example restricts access to two C class networks and # the "loopback" interface. For more examples of the syntax see #the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.
load printers = yes # Put a capping on the size of the log files (in Kb).
max log size = 50
# Security mode. Most people will want user level security. See # security_level.txt for details.
security = ads
# Use password server option only with security = server
password server = PVALENTINO_DC1 PVALENTINO_DC2 # Password Level allows matching of _n_ characters of the password for # all combinations of upper and lower case.
; password level = 8
; username level = 8 # You may wish to use password encryption. Please read # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. # Do not enable this option unless you have read those documents
; encrypt passwords = yes
; smb passwd file = /etc/samba/smbpasswd # The following are needed to allow password changing from Windows to # update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. # NOTE2: You do NOT need these to allow workstations to change only # the encrypted SMB passwords. They allow the Unix password # to be kept in sync with the SMB password.
; unix password sync = Yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %nn *ReType*new*UNIX*password* %nn *passwd:*all*authentication*tokens*updated*successfully* # Unix users can map to different SMB User names
; username map = /etc/samba/smbusers # Most people will find that this option gives better performance. # See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 [data]
comment = batch processing directory
path = /data
public = no
writable = yes
# A read Only directory for logs
[log]
comment = Log Directory
path = /log
public = yes
read only = no
hide unreadable = yes
change permissions on data and log directories shown at end
############################### END smb.conf ###############################
#################### Edit /etc/samba/smbusers as follows ###################
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin anotheradmin nobody = guest pcguest smbguest
#################### End smbusers ###########################################
#### Edit /etc/krb5.conf as follows ################
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = PVALENTINO.LAN
dns_lookup_realm = false
dns_lookup_kdc = true
[realms]
EXAMPLE.COM = {
kdc = kerberos.example.com:88
admin_server = kerberos.example.com:749
default_domain = example.com
}
PVALENTINO.LAN = { kdc = PVALENTINO_dc1.PVALENTINO.lan }
[domain_realm]
.PVALENTINO.lan = PVALENTINO.LAN
PVALENTINO.lan = PVALENTINO.LAN
.kerberos.server = PVALENTINO.LAN
[kdc]
profile = /var/kerberos/krb5kdc/kdc.conf
[appdefaults]
pam = {
debug = false ticket_lifetime = 36000 renew_lifetime = 36000 forwardable = true krb4_convert = false
}
####################### END /etc/krb5.conf ############################### ####################### Edit /etc/nsswitch.conf as follows ########## passwd: files winbind shadow: files group: files winbind services: files winbind protocol: files winbind netgroup: files winbind automount: files winbind ######################################################### ###################### Edit /etc/pam.d/system-auth as follows ####### add the following entries to their respective sections: This line goes after the pam_unix.so entry in auth section: auth sufficient /lib/security/$ISA/pam_winbind.so use_first_pass This line goes goes after pam_succeed_if.so entry in the account section: account [default=bad success=ok user_unknown=ignore] /lib/security/$ISA/pam_winbind.so This line goes before the pam_deny.so entry in password section: password sufficient /lib/security/$ISA/pam_winbind.so use_authtok ##################### END ################################# Create etc/pam.d/gdm as follows: #%PAM-1.0 auth required pam_env.so auth required pam_stack.so service=system-auth auth required pam_nologin.so account required pam_stack.so service=system-auth password required pam_stack.so service=system-auth session required pam_stack.so service=system-auth session required pam_loginuid.so session optional pam_console.so session required pam_mkhomedir.so skel=/etc/skel/ umask=0077 Edit /etc/pam.d/... gdm login and sshd as follows: Add the following entry to the bottom of each file session required pam_mkhomedir.so skel=/etc/skel/ umask=0077 Then make sure to manually create the directory /home/PVALENTINO_DOMAIN Change permissions on the shared directories from smb.conf do getent group grep "Windows Group Name" # to confirm you have correct name chgrp -R "Windows Group Name" /log chgrp -R "Windows Group Name" /data chmod 775 /log chmod 775 /data Run the following: chkconfig winbind on chkconfig smb on service start winbind service start smb net ads join -U administrator Test winbind with: # winbind -t # winbind -m # wbinfo -u TRAINING2$ TRAINING3$ TRAINING8$ ...... # wbinfo -g ........ getent passwd getent group

Centralized Syslog Server Setup Part I

*** SETUP SYSLOG: - Create and mount /syslog - mkdir /syslog/archive - Edit /etc/sysconfig/syslog and edit SYSLOGD_OPTIONS to read: SYSLOGD_OPTIONS="-r -x -m 5" The -r option will enable listening for syslog messages. -x will disable DNS lookups. -m 5 will cause a MARK message to be logged to the log files every five minutes, to provide a local system time reference. - Edit /etc/syslog.conf to contain: *.=emerg;*.=panic /syslog/0_panic.log *.=alert /syslog/1_alert.log *.=crit /syslog/2_critical.log *.=err;*.=error /syslog/3_error.log *.=warn;*.=warning /syslog/4_warning.log *.=notice /syslog/5_notice.log *.=info /syslog/6_info.log # Record time marks to all logs mark.* /syslog/0_panic.log mark.* /syslog/1_alert.log mark.* /syslog/2_critical.log mark.* /syslog/3_error.log mark.* /syslog/4_warning.log mark.* /syslog/6_info.log - Create /etc/logrotate.d/syslogcollector and add to it: /syslog/*.log { daily rotate 91 olddir /syslog/archive copytruncate compress missingok } - service syslog restart *** INSTALL MONIT: Monit is used to watch services (ntpd and syslog), and restart them if they fail. - Make sure the GCC compiler, Flex, Bison, and the OpenSSL development packages are installed. yum -c http://santa.my.lan/repository/patch/current/rhel4-i386.conf install gcc flex openssl-devel bison - Get the latest monit from http://www.tildeslash.com/monit/ and untar. - cd into the extracted monit directory - As root: ./configure && make && make install - cp contrib/rc.monit /etc/init.d/monit - chmod u+x /etc/init.d/monit - Edit /etc/init.d/monit: - change "MONIT=/usr/bin/monit" to "MONIT=/usr/local/bin/monit" - chkconfig --add monit - chkconfig monit on - vi /etc/monitrc ##### BEGIN CONFIG ##### set daemon 15 # Poll at 15 second intervals set logfile syslog set alert techsupport@my.org set mailserver mail.my.org with timeout 15 seconds set mail-format { from: monit@$HOST subject: $SERVICE $EVENT at $DATE message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION } check process ntpd with pidfile "/var/run/ntpd.pid" start program = "/sbin/service ntpd start" stop program = "/sbin/service ntpd stop" if 2 restarts within 3 cycles then timeout check process syslogd with pidfile "/var/run/syslogd.pid" start program = "/sbin/service syslogd start" stop program = "/sbin/service syslogd stop" ##### END CONFIG ##### - chmod 700 /etc/monitrc - service monit start *** USAGE: syslog and monit can be stopped, started, restarted, or get its status with the standard 'service' command. Log into the system (syslog-test or syslog-prod) as root, and run: service [monitsyslog] [stopstartrestartstatus] All received syslog messages are stored in files in /syslog/, broken up by message priority level (see also RFC3164 for a full description of the syslog protocol): /syslog/0_panic.log -- Emergency/Panic messages /syslog/1_alert.log -- Alert messages /syslog/2_critical.log -- Critical messages /syslog/3_error.log -- Error messages /syslog/4_warning.log -- Warning messages /syslog/5_notice.log -- Notice messages /syslog/6_info.log -- Informational messages The lower the first number in the filename, the more important the message is. These files are rotated daily into the /syslog/archive/ directory, and are compressed to save space. 91 days of the old logs are kept... anything older than 91 days will be deleted.

Nulear Power

A guy was seated next to a 10-year-old girl on an airplane. Being bored, he turned to the girl and said, "Let's talk. I''ve heard that flights go quicker if you strike up a conversation with your fellow passenger." The girl, who was reading a book, closed it slowly and said to the guy, "What would you like to talk about?" Oh, I don't know," said the guy. "How about nuclear power?" "OK," she said. "That could be an interesting topic. But let me ask you a question first. A horse, a cow and a deer all eat the same stuff... grass. Yet a deer excretes little pellets, while a cow turns out a flat patty, and a horse produces clumps of dried grass. Why do you suppose that is?" The guy thought about it and said, "Hmmm, I have no idea." To which the girl replied, "Do you really feel qualified to discuss nuclear power when you don''t know sh*t?"

Move the /var partition example

  • Perform 2 sets of backups for the whole system based on individual disks. (using tar)
  • Perform one set of UFSDUMP backup for each partition under the root directory.
  • Commented out the scripts from rc2.d (i.e. rename the startup files that fireup oracle in the /etc/rc2.d and
  • /etc/rc3.d directory)
  • Repartition the /export/home and restored.
  • Test on mounting/unmounting/ufsrestoring file systems by booting from CDROM. (This was done before reconfiguring the /usr partition)
  • Repartition the /usr
  • Repartition the /opt
  • Repartition the /var
  • Ufsrestore the /var
  • Ufsrestore the /opt
  • Ufsrestore the /usr

PROBLEM

  • Couldn't restore /usr at first (Possibly because of symbolic links or other files seeking information from /opt ) so we tried restoring /var , /opt and then /usr in sequence and it worked.
Alternate:
  • Stop all the process relating to oracle ,unmount u1, u2, ... comment out the filesystems that get mounted during bootup in the /etc/vfstab file ( relating to u1 u2 u3)
  • Also rename the startup files that fireup oracle in the /etc/rc2.d and /etc/rc3.d directory. Use ufsdump of the entire partition i.e. / /usr /var /opt/ .
  • Increasing the /var partition can be done by: Reducing the /opt partition or changing /opt and subsequent partitions i.e. /usr and /export/home.
  • Format/select appropriate disk and partition , print command will tell the option required.
  • Boot cdrom -sw run format partition and change appropriate values
  • Create newfs and ufsrestore appropriate partitions that have been newfsed
  • Boot the system back in single user mode then into multi user
iostat -xtc 5 2 The fields have the following meanings: disk name of the disk r/s reads per second w/s writes per second Kr/s kilobytes read per second Kw/s kilobytes written per second wait average number of transactions waiting for service (Q length) actv average number of transactions actively being serviced (removed from the queue but not yet completed) %w percent of time there are transactions waiting for service (queue non-empty) %b percent of time the disk is busy (transactions in progress) vmstat 5 procs memory page disk faults cpu r b w swap free re mf pi po fr de sr m1 m1 m1 m1 in sy cs us sy id 0 1 0 3167960 1566944 175 142 1024 25 25 0 0 1 0 0 11 1625 1195 28 10 14 76 0 1 0 3239256 1684496 170 122 878 1 1 0 0 0 0 0 1 18040 1134 1139 0 2 98 0 1 0 3239304 1684520 164 180 854 0 0 0 0 0 0 0 1 17462 1155 1155 1 3 96 0 1 0 3239208 1684528 118 47 883 0 0 0 0 0 0 0 1 18351 872 1173 0 1 99 0 1 0 3239208 1684496 108 0 865 0 0 0 0 0 0 0 0 18012 794 1125 0 2 98 0 1 0 3239256 1684424 126 64 814 0 0 0 0 0 0 0 0 17287 1211 1231 0 2 98 0 1 0 3239256 1684440 108 0 870 0 0 0 0 4 0 1 9 18458 808 1182 0 3 97 sr column would indicate if there was any memory issue sar -g 5 5 SunOS vortex 5.8 Generic_117350-46 sun4u 06/05/07 11:40:26 pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf 11:40:31 0.00 0.00 0.00 0.00 0.00 11:40:36 0.00 0.00 0.00 0.00 0.00 prstat -s cpu -n 5 PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 6244 root 8608K 6792K cpu0 20 0 0:00.12 20% bpsched/1 6262 root 9616K 4184K run 30 0 0:00.10 17% bpdbm/1 6253 root 8096K 5872K run 30 0 0:00.07 11% bpexpdate/1 6259 root 9456K 4456K sleep 53 0 0:00.02 3.7% bpdbm/1 24115 root 41M 6536K sleep 59 0 0:02.35 0.4% bptm/1 Total: 91 processes, 203 lwps, load averages: 0.68, 0.29, 0.23 netstat -i Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue lo0 8232 loopback localhost 52165296 0 52165296 0 0 0 ce0 1500 vortex vortex 31979593 0 2207970842 0 0 0
Big Brother Host Groups for No Paging

Create a host group in /bb/etc/bbwarnsetup.cfg, for example:

hg-nopaging: test1 dev1 test2 dev2

Create a notification rule to disable paging for hg-nopaging in /bb/etc/bbwarnrules.cfg, for example:

!hg-nopaging;;*;;*;*;*
Add LDAP entries to Sun Directory Server example

INSTALL INSTRUCTIONS:
1) shutdown ldap-prod server
1.5) checkout from CVS applications /conf/Ldap Schema/myschema.ldif
2) add file"myshcema.ldif" to the directory:
/apps/SunJSDS/default/slapd-ldap-prod/config/schema
3) restart the ldap server
4) validate that schema values appear in the management console


HOW LONG TO VERIFY SUCCESS : 10 minutes
VERIFY STEPS:
1) validate that users are viewable in weblog console
2) validate that ldap admin server views new new types.

Backout Plan:
1) shutdown the ldap server
2) remove the .ldif file
3) restart the ldap server
4) verify
Backout Duration: 30 minutes
IPTABLES on Big Brother Server with NetBackup chain

*filter

:INPUT ACCEPT [0:0]

:FORWARD ACCEPT [0:0]

:OUTPUT ACCEPT [0:0]

:RH-Firewall-1-INPUT - [0:0]

:NETBACKUP - [0:0]

-A INPUT -j RH-Firewall-1-INPUT

-A FORWARD -j RH-Firewall-1-INPUT

-A RH-Firewall-1-INPUT -i lo -j ACCEPT

-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

# SNMP traffic

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 161 -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 161 -j ACCEPT

# Big Brother client data

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1984 -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 1984 -j ACCEPT

# Netbackup ports get filtered to the NETBACKUP chain

-A RH-Firewall-1-INPUT -p tcp -m tcp --sport 13701 -j NETBACKUP

-A RH-Firewall-1-INPUT -p tcp -m tcp --sport 13711 -j NETBACKUP

-A RH-Firewall-1-INPUT -p tcp -m tcp --sport 13720:13724 -j NETBACKUP

-A RH-Firewall-1-INPUT -p tcp -m tcp --sport 13782:13783 -j NETBACKUP

-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 13701 -j NETBACKUP

-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 13711 -j NETBACKUP

-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 13720:13724 -j NETBACKUP

-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 13782:13783 -j NETBACKUP

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

##### End of RH-Firewall-1-INPUT definitions #####

# Netbackup chain -- only allow netbackup ports to/from netbackup servers

-A NETBACKUP -s 10.10.1.30 -j ACCEPT

-A NETBACKUP -s 10.11.1.20 -j ACCEPT

-A NETBACKUP -d 10.10.1.30 -j ACCEPT

-A NETBACKUP -d 10.11.1.20 -j ACCEPT

-A NETBACKUP -j REJECT --reject-with icmp-port-unreachable

COMMIT

My Brainbench Personality Assessment - Evaluation Report for Paul Valentino


Important. Please see the notes below. They provide you with additional information in interpreting your scores.


PERSONALITY EVALUATION

Trait Range Trait
Introverted Extraverted
Candid Considerate
Impulsive Cautious
Excitable Relaxed
Practical Imaginative
Concrete Abstract
Range


INTERPRETATION NOTES

Your Social Boldness: Introverted VS Extraverted
You are moderately introverted. You have a flexible personality. You are comfortable sitting back and letting others take the spotlight, yet you don't mind if the direction of the conversation is focused on you. Your warm and friendly personality generates respect from others, so if you are put into a leadership role you can certainly handle it. In general, you may not volunteer to speak in front of a group, but if you are in the proper frame of mind, you feel at ease when making a presentation. When you believe in something, you tend to share your thoughts. People enjoy when you do this, because you have a cheerful way about you. At times, you can be adventuresome, but a night home relaxing is just as fun for you.
Your Agreeableness: Candid VS Considerate
You are very considerate. You are a popular person, aren't you? Of course you are. You truly value harmony in dealing with others. People recognize your friendly, generous, and helpful personality. Your easy-going, agreeable nature makes you such a joy to be around. This is especially true in meetings or general conversations. The topic may become heated, but you are considerate of other's feelings and you will find a happy medium in order to placate those around you. This is because you have an optimistic view of human nature and you realize that if you trust people with their decisions that they are not trying to hurt you or take advantage of you. This special and rare quality is also seen in your altruism. You enjoy helping others. To you it is not a sacrifice; to you it is fulfilling to help others in need.
Your Self-Control: Impulsive VS Cautious
You are very impulsive. You are an independent thinker. You do not need a book of rules to tell you how to behave - you know inside what is right and what is wrong and you act accordingly. You are able to live life spontaneously, because you are able to make decisions without endless deliberation. In fact, when you and another person are making a decision, you are able to reach a solution fairly quickly while the other person has to cautiously plan every step. Eventually, they will agree with you, which is frustrating when your first impulse is usually the correct one in the decision-making process. You tend to be a little more casual, and you do not feel out of sorts when your home or office is not perfectly neat. In general, your life is pleasurable - you know how to have fun and will never be accused of being staid or stuffy.
Your Anxiety Level: Excitable VS Relaxed
You are quite relaxed. You are so well adjusted. No one will ever accuse you of being an emotional basket case. You are able to face reality in a very emotionally stable way. Your calmness is admirable. When others are feeling stress or frustration, you are able to objectively survey the situation and not become frustrated. You are placid and self-assured. Your unflappable personality is a comfort to others who are feeling tense. In fact, in times of stress you are able to think very clearly in order to solve any problem. Your poise in tough situations comes through automatically - its just part of your personality, you do not have to fake it. You do not let pressure bother you at all. In fact, you are able to adapt to any situation in a confident manner. You do not get angry easily and are able to keep your emotions in check.
Your Openness to Change: Practical VS Imaginative
You are slightly practical. It is apparent to those who meet you that you are well educated. You are able to speak on a complex level to one audience, but adjust to a more basic level for another. You are bright and capable of thinking logically. On one hand you are down-to-earth and traditional, while on the other hand you are creative and imaginative. Sometimes you feel more comfortable with familiarity and routine in your life, other times new and novel experiences are more enjoyable. You are not afraid to try new things. You tend to like to do a variety of different activities, so you do not grow bored.
The way you Think/Reason: Concrete VS Abstract
You are very abstract in your thinking. You tend to be quick to grasp ideas, are a fast learner and intelligent. You possess a hallmark of intelligence that potentially separates human beings from earlier life forms, the ability to think about future consequences before acting on an impulse. Your reasoning activity involves contemplation of long-range goals, organizing and planning routes to these goals, and persisting toward one's goals in the face of short-lived impulses to the contrary. You also have keen interests in intellectual matters and love to play with ideas and think theoretically. You tend to be open-minded to new and unusual ideas, and like to debate intellectual issues. You often enjoy riddles, puzzles, and brainteasers.