Friday, October 29, 2010

Collect System details by using these tools

Red Hat Enterprise Linux Platform:
Red Hat Enterprise Linux versions 3, 4 and 5 come with a data gathering tool called "sysreport".
The sysreport tool is a script that collects configuration information and log files when executed, much the same way that Sun Explorer does for Solaris.
To collect information on a Red Hat Enterprise Linux platform versions 3, 4 or 5, run the following command:
  • /usr/sbin/sysreport
Red Hat sysreport is a deprecated tool meaning that its support life is limited and has been replaced with a new data gathering tool called "sosreport". If sosreport is installed, the sosreport script will replace sysreport and execute in it's place. The sosreport tool is built-in on Red Hat Enterprise Linux 4.7 and above.
To collect information on a Red Hat Enterprise Linux platform with sosreport installed, run the following command:
  • /usr/sbin/sosreport
Red Hat's latest data gathering tool, sosreport is available to download via the Red Hat Network . The sosreport package can be download using the following command:
  • /usr/sbin/up2date sos (Red Hat 4)
  • /usr/sbin/yum install sos (Red Hat 5)
Alternatively, if downloaded manually you can install sosreport using the following command:
  • /bin/rpm -Uvh sysreport-VERSION.ARCHITECTURE.rpm
These programs will report their output file location when finished.
SuSE Enterprise Linux Platform:
SuSE Enterprise Linux uses a data gathering called tool called "siga".
The siga tool is a script that collects configuration information and log files when executed, much the same way that Sun Explorer does for Solaris.
To collect information on a SuSE Enterprise Linux, run the following command:
  • /usr/bin/siga no (using "no" parameter will run siga but not launch a browser, only gathering the data)
SuSE siga is a deprecated tool meaning that its support life is limited and has been replaced with a new data gathering tool called "supportconfig".
To collect information on a SuSE Enterprise Linux with supportconfig installed, run the following command:
  • /usr/bin/supportconfig -A (using the "-A" eliminates the 500 line limit of message files)
SuSE's latest data gathering tool, supportconfig is available to download via the Novell SuSE repository . The "supportconfig" package can be download using the following command:
  • /sbin/yast -i supportutils
Alternatively, supportconfig can be downloaded from the SuSE website and installed manually using the following command:
  • /bin/rpm -Uvh supportutils-1.01-15.1.noarch.rpm



To collect data from the iLOM service processor, use another network enabled Solaris, Linux or Windows 1 platform to collect the following information:
IPMI Command Description
ipmitool -I lanplus -H XXX.XXX.XXX.XXX -U root fru System component details
ipmitool -I lanplus -H XXX.XXX.XXX.XXX -U root sel elist System event log details
ipmitool -I lanplus -H XXX.XXX.XXX.XXX -U root -v sel elist Verbose system event log
ipmitool -I lanplus -H XXX.XXX.XXX.XXX -U root sdr System sensor repository
ipmitool -I lanplus -H XXX.XXX.XXX.XXX -U root sunoem led get System LED indicator status

Thursday, October 21, 2010

Fix Solaris 10 pam.d error

The pam.d error could be, if somebody runs the JES cleaning script, especially when you wipe out SUNWtls (NSS) and/or SUNWpr (NSPR), the OS won't allow you to login into X or multiuser and will get this pam.d

So the solution is, go to the single user mode and install the SUNWtls and pr pkgs from the S10 media/NFS path.

In single user mode you can ftp the files if you create a tar file of above directories 

Increasing size of the vdi image

http://www.modhul.com/2008/10/21/re-sizing-a-virtualbox-virtual-disk-image-file/

Update the Webmin Tool to Manage the Solaris 10 OS

Update the Webmin Tool to Manage the Solaris 10 OS Securely Over HTTPS

César Augusto Sánchez Baquero, August 2007
The Webmin server is an open source tool that enables system administrators to manage systems that run the Solaris Operating System, UNIX, or Linux using a web browser. You can access the server using HTTP or HTTPS. Webmin is included in the Solaris 10 OS; however, the version included is an old version with a default certificate.
If you update Webmin to the latest version, the HTTPS support doesn't work unless you use the following steps.
1. Set up the Webmin server that is included with the Solaris 10 OS by executing the following command as root:
/usr/sfw/bin/webminsetup
2. You can press ENTER to answer the two first questions, but for the third question, answer y:
Login name (default root):

Web server port (default 10000):

Use SSL?  [y,n,?,q] y
3. Access the Webmin server using a web browser by typing the address https://SERVER.IP.ADDRESS:10000.
4. Log in using the root user name and root password.
5. Create your own certificate:
  • Go the Webmin Configuration Option and then go to the SSL Encryption module.
  • In the Create Certificate option, fill in the form. In the Server Name field, put the server's IP address.
  • Click Create Now.
6. Before updating Webmin to the latest version, copy the Perl files that support HTTPS and SSL encryption to the Perl library directory:
cd /usr/sfw/lib/webmin
cp perlmod/* /usr/perl5/5.8.4/lib/
7. Configure the proxy settings, if necessary. If you access the Internet through a proxy, set your proxy information in the Proxy Servers module of the Webmin Configuration menu.
8. Update Webmin to the latest version:
  • In the Webmin Configuration menu, select the Upgrade Webmin module.
  • Select the option Latest version from http://www.webmin.com, and then click Update Webmin. You can also update the Webmin modules in the Update Modules option of this module.
Now you can manage your systems running the Solaris 10 OS with the latest version of Webmin in a secure fashion using HTTPS.

Mounting zfs root file system of disk by booting Opensolaris Live cd

  • Import the pool
    • zpool import
    • zpool import -f poolname
  • Create a temp directory
    • mkdir /tmp/zfs
  • Mount the pool
    • beadm mount opensolaris /tmp/zfs

Opensolaris : Disabling root role option and login as root

You can either su to root from a user that has that role (the user you created at install time will have the root role), or
you can remove the "type=role;" from the start of the root line in /etc/user_attr.

Configure NIS Client : Ubuntu

https://help.ubuntu.com/community/SettingUpNISHowTo

Booting Opensolaris to Single user mode

title OpenSolaris 2008.11 snv_101b X86
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/opensolaris-1
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

title OpenSolaris 2008.11 snv_101b X86 graphics boot
findroot (pool_rpool,0,a)
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
bootfs rpool/ROOT/opensolaris-1
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive

Use this below Option to Boot in Single User Mode

title OpenSolaris 2008.11 snv_101b X86 Single User Mode
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/opensolaris-1
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -s
module$ /platform/i86pc/$ISADIR/boot_archive

How to Create an ALOM CMT Compatibility Shell

1. Log onto the server with username: root. When powered on, the server boots to the ILOM login prompt. The factory default password is changeme
SUNSPxxxxxxxxxxxx login: root
Password:
Waiting for daemons to initialize...
Daemons ready
Sun(TM) Integrated Lights Out Manager
Version 2.0.0.0 Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Warning: password is set to factory default.
2. Create a user named admin, set the admin account role to Administrator and the CLI mode to alom
-> create /SP/users/admin Creating user... Enter new password: ******** Enter new password again: ******** Created /SP/users/admin
-> set /SP/users/admin role=Administrator Set 'role' to 'Administrator' -> set /SP/users/admin cli_mode=alom Set 'cli_mode' to 'alom'
Note - The asterisks in the example will not appear when you enter your password.
You could also combine the create and set commands on a single line:
-> create /SP/users/admin role=Administrator cli_mode=alom Creating user... Enter new password: ******** Enter new password again: ******** Created /SP/users/admin
3. Log off the root account after you have finished creating the admin account.
-> exit
4. Log into the ALOM CLI shell (indicated by the -> prompt) from the ILOM login prompt.
SUNSPxxxxxxxxxxxx login: admin Password: Waiting for daemons to initialize... Daemons ready Sun(TM) Integrated Lights Out Manager Version 2.0.0.0 Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
sc>

HP-UX NIS Configuration

  • Make sure in the /etc/nsswitch.conf file : for hosts: files nis NOTFOUND=return files
  • Log in as root to the NIS client.
  • Add the -ypset option to the YPBIND_OPTIONS variable in the /etc/rc.config.d/namesvrs file, as follows:
    • YPBIND_OPTIONS="-ypset"
  • In the /etc/rc.config.d/namesvrs file, set the YPSET_ADDR variable to the IP address of an NIS server, as in the following example:
    • YPSET_ADDR="119.148.237.82" #YP Server Name
  • Issue the following commands to restart the NIS client
    • /sbin/init.d/nis.client stop
    • /sbin/init.d/nis.client start

If need ,  please reboot the server to work automount and any other  applications to work properly .

Download HP-UX old Patches

ftp://ftp.itrc.hp.com/
ftp://ftp.itrc.hp.com/patch_bundles/hp-ux/

SunFire x2200 Net management

To configure net management port For SunFire X2200

Step1:- connect the m/c to laptop through DB9 cable and open hyperterminal.
Step2:- Login Prompt will appear default login id & passwd. ( root & changeme)
Step3:- The system BIOS setup screen. Choose Advanced - >IPMI 2.0 Configuration - >Set LAN Configuration - > IP address- > save this and boot the m/c.
Step4:- Run below following command.
show /SP/AgentInfo
start /SP/AgentInfo/console
set /SP/AgentInfo Gateway=gateway
Step4:- After doing all this ping the ip address to verify & ssh to the same.
Step5:-Open a browser m/c should be accessible now https://ipaddress
If you found any issues Please refer the below commands
set /SP/AgentInfo DhcpConfigured=disable
set /SP/AgentInfo NetMask=netmask
set /SP/AgentInfo Gateway=gateway
set /SP/AgentInfo IpAddress=ipaddress
1. Reboot the system by typing the following command from the SP CLI:
set /SP/SystemInfo/CtrlInfo PowerCtrl=reset
2. Launch the console from the SP using the following command:
start /SP/AgentInfo/console
http://docs.sun.com/source/819-6596-12/Chap2.html

Writing CD/DVD in Solaris

To create iso file

  • mkisofs -o newfile.iso /directory/location/data

To write the iso file to writer

  • cdrw -i /path/file.iso

To write directories to cd/dvd (doing both above in one step )

  • mkisofs -r /directory/data  2>/dev/null | cdrw -i -p 1

Reset HP-UX system passord

 

Following the procedure to reset root password for HP-UX



Boot into single user mode:


Stop the boot process when it says "Press any key to stop in 10 seconds". It will be on "Main Menu >" prompt.

Type "bo pri" hit Enter.
< Interact with IPL ? >
Say Y ( for yes)
You will be at "ISL>" prompt.
Type "hpux -is" hit Enter.
System will be booted in single user mode and it will be logged in as "root".
At the end of this you'll be able to change root password by entering command

$ passwd root