Popular Posts

Mar 22, 2018

Enable ssh in Solaris Legacy os Versions 6, 7 , 8 or 9


Enable ssh in Solaris Legacy os Versions 6, 7, 8 or 9

Issue :
Solaris 9 and below versions do not have ssh installed, This is a headache for those who are new to  Solaris administration and not familiar with Solaris 9 and below or Legacy Solaris OS's

Goal :
Install the ssh and supporting packages to enable ssh in Solaris 7, 8, 9 servers.
The required packages are :
    openssh
    openssl (SSL)
    prngd (Psuedo Random Generator Daemon)
    zlib (Z library)

All of the required packages are availble to download in the below google drive link.

Solution :
        1. Download the sshpkgs.sol8.tar.gz bundle and readme file from google drive
               OR
                     Package website link -   http://spout.ussg.indiana.edu/solaris/sparc/
                     Download the packages openssh , openssl (SSL) , prngd , zlib (Z library)

        2. Extract the package bundle
               # gzip -d sshpkgs.sol8.tar.gz ; tar -xvf sshpkgs.sol8.tar

        3. Install the openssl package
               # pkgadd -d openssl-0.9.6c-sol8-sparc-local

        4. Install the prngd package
               # pkgadd -d prngd-0.9.23-sol8-sparc-local

        5. Install the zlib package
               # pkgadd -d zlib-1.1.4-sol8-sparc-local

        6. Install the openssh package
               # pkgadd -d openssh-3.1p1-sol8-sparc-local

        7. Create a startup script for the ssh daemon with below content
                # vi /etc/init.d/sshd
                              #! /bin/sh
                              #
                              # start/stop the secure shell daemon
                              case "$1" in
                              'start')
                                   # Start the ssh daemon
                                   if [ -f /usr/local/sbin/sshd ]; then
                                        echo "starting SSHD daemon"
                                        /usr/local/sbin/sshd &
                                   fi
                                   ;;
                              'stop')
                                   # Stop the ssh deamon
                                   PID=`/usr/bin/ps -e -u 0 | /usr/bin/fgrep sshd | /usr/bin/awk '{print $1}'`
                                   if [ ! -z "$PID" ] ; then
                                        /usr/bin/kill ${PID} >/dev/null 2>&1
                                   fi
                                   ;;
                              *)
                                   echo "usage: /etc/init.d/sshd {start|stop}"
                                   ;;
                              esac

        8. Make the script executable and create a startup script on run level 2
                # chmod +x /etc/init.d/sshd
                # ln -s /etc/init.d/sshd /etc/rc2.d/S99sshd

        9. Create a startup script for the pseudo random generator daemon.
                # vi /etc/init.d/prngd
                              #! /bin/sh
                              #
                              # start/stop the pseudo random generator daemon
                              case "$1" in
                              'start')
                                   # Start the ssh daemon
                                   if [ -f /usr/local/bin/prngd ]; then
                                        echo "starting PRNG daemon"
                                        /usr/local/bin/prngd /var/spool/prngd/pool&
                                   fi
                                   ;;
                              'stop')
                                   # Stop the ssh deamon
                                   PID=`/usr/bin/ps -e -u 0 | /usr/bin/fgrep prngd | /usr/bin/awk '{print $1}'`
                                   if [ ! -z "$PID" ] ; then
                                        /usr/bin/kill ${PID} >/dev/null 2>&1
                                   fi
                                   ;;
                              *)
                                   echo "usage: /etc/init.d/prngd {start|stop}"
                                   ;;
                              esac

        10. Make the script executable and create a startup script on run level 2
                 # chmod +x /etc/init.d/prngd
                 # ln -s /etc/init.d/prngd /etc/rc2.d/S99prngd

        11. Start the prngd sevice
                 # mkdir -p /var/spool/prngd
                 # /etc/init.d/prngd start

        12. Create a public key pair to support the new, DSA-based version 2 protocol
                 # /usr/local/bin/ssh-keygen -d -f /usr/local/etc/ssh_host_dsa_key -N ""

        13. Create a public key pair to support the old, RSA-based version 1 protoco
                 # /usr/local/bin/ssh-keygen -b 1024 -f /usr/local/etc/ssh_host_rsa_key -t rsa -N ""

        14. Edit ssh daemon configuration file /usr/local/etc/sshd_config, enable protocol 2 and 1
                 Uncomment the line, that says
                 protocol 2,1

        15. starting SSHD daemon
                 # /etc/init.d//sshd start

Your ssh server is now ready to accept a ssh session.



~Judi~

###Help
http://www.unixguide.net/sun/ssh_installation.shtml

###PKGS available under
http://spout.ussg.indiana.edu/solaris/freeware/sparc/5.8/







Mar 13, 2018

Oracle Solaris Explorer Data Collector

Oracle Solaris Explorer Data Collector

Oracle Solaris explorer : 

The latest Services Tools Bundle is (STB) 8.18.17.12.12 (13-Mar-2018)

APPLIES TO :  Solaris 8,9,10, 11

     1. To determine if your version of Oracle Solaris is 32 or 64 bit, run:
                judi-dev-01 #:  isainfo -v        ### Output will look like:
                                64-bit sparcv9 applications
                                32-bit sparc applications
                To determine the kernel modules, run:
                judi-dev-01 #:  isainfo -vk        ### Output will look like:
                                64-bit sparcv9 kernel modules
     2. Download and Install Oracle Services Tools Bundle
                Download and unzip the Oracle Services Tools Bundle from Doc ID 1153444.1
                Dwonload the zip file based on your Solaris bit and version

     3. Oracle Explorer Data Collector Installation
                chmod +x install_stb.sh  ### Make sure the install script is executable:
                ./install_stb.sh -verbose  ### Run the following command:
                  

     4. Oracle Explorer Data Collector man pages
                To access the Explorer man page of section 1m on Solaris 10, run:
                man -M /opt/SUNWexplo/man -s 1m explorer

     5. Run Explorer
                explorer -w all -T DA -SR <Service Request number>

     6. Run Explorer for Different Modules/Groups
                explorer -w all  ### Runs all modules.
                explorer -w all,interactive  ### If the modules tagged to the group all require user interaction, the user is prompted for input.
                explorer -w default  ### Runs modules tagged to default
                explorer -w default,interactive  ### Runs modules tagged to default group. If the modules tagged to the group default require user interaction, the user is prompted for input.
                explorer -w extended  ### Runs modules tagged to mandatory or extended group.
                explorer -w <module name>  ### Runs <module name> and modules tagged to the mandatory group.
                explorer -w default,<module name> 

     7. Explorer Output Directory
                To store its collection result file, Explorer will create a subdirectory in the output directory of Explorer. 
                /var/explorer/output   ###  on Solaris 11 or later
                /opt/SUNWexplo/output   ###  on Solaris 8, 9, and 10.
                


~Judi~


Mar 7, 2018

Configure DNS in Solaris 11


DNS Configuration : Configure DNS in Solaris 11

APPLIES TO :  Solaris 11 DNS settings.

     1. Set the DNS IP's or Name server address
                svccfg -s network/dns/client setprop config/nameserver = net_address: "(192.168.10.10 192.168.10.11 192.168.10.12)"

     2. Set the fully qualified domain name string
                svccfg -s network/dns/client setprop config/domain = astring: in.mycompany.com

     3. Set where to search for nslookups
                svccfg -s network/dns/client setprop config/search = astring: '("in.mycompany.com" "in.myoldcompany.com" "in.previouscompany.com")'

     4. Refresh the settings and enable it.
               svcadm refresh dns/client
               svcadm enable dns/client

     5. Export the configuration.
               nscfg export svc:/network/dns/client:default
     
     6. Verify/List the configuration
               svccfg -s network/dns/client listprop config
               cat /etc/resolv.conf

      7. Commands to change DNS resolver settings:
               svccfg -s name-service/switch setprop config/ipnodes = astring: '("files dns")'
               svccfg -s name-service/switch setprop config/host = astring: '("files dns")'
               svccfg -s name-service/switch 'setprop config/host = "files dns [TRYAGAIN=0]"'
               svccfg -s dns/client 'setprop config/options = "timeout:3 attempts:1"'
               svcadm refresh name-service/switch

      8. List nsswitch configuration
               svccfg -s name-service/switch  listprop config
               egrep '^(hosts|ipnodes):' /etc/nsswitch.conf


~Judi~

Mar 5, 2018

Error in TLS protocol server_name


BMC BladeLogic Error : Error in TLS protocol: <server_name>


APPLIES TO : BMC Server Automation 8.8, RSCD, TLS Error , RSCD log will shoup up this below error.

RSCD ERROR :
03/05/18 00:00:27.774 WARN     rscd -  ::ffff:192.168.1.10 12267 -1/-1 (Not_available): (Not_available): /etc/rsc/secure is empty, proceeding ahead with the default secure settings
03/05/18 00:00:27.776 WARN     rscd -  ::ffff:192.168.1.10 12267 -1/-1 (Not_available): (Not_available): TLS setup failed for agent: Protocol mismatch. Check that client and server "secure" files match. Exiting and terminating connection.
03/05/18 13:54:16.544 WARN     rscd -  ::ffff:192.168.1.10 26228 -1/-1 (Not_available): (Not_available): /etc/rsc/secure is empty, proceeding ahead with the default secure settings
03/05/18 13:55:37.163 WARN     rscd -  ::ffff:192.168.1.10 26555 -1/-1 (Not_available): (Not_available): /etc/rsc/secure is empty, proceeding ahead with the default secure settings

03/05/18 13:55:37.164 WARN     rscd -  ::ffff:192.168.1.10 26555 -1/-1 (Not_available): (Not_available): TLS setup failed for agent: Protocol mismatch. Check that client and server "secure" files match. Exiting and terminating connection.


SYMPTOM :  /etc/rsc/secure file content may be wrong, 

SOLUTION :  Verify the /etc/rsc/secure file for the below content and correct it and then scan the server from Blodelogic Console.

rscd:port=4750:protocol=5:tls_mode=encryption_only:encryption=tls:timeout=600:

default:port=4750:protocol=5:tls_mode=encryption_only:encryption=tls:timeout=600:client_keepalive_time=180:



~Judi~

Popular Posts