Showing posts with label Small but thick knowledge...... Show all posts
Showing posts with label Small but thick knowledge...... Show all posts

Wednesday, March 4, 2020

Small but thick knowledge.....


To create a super user in UNIX/LINUX      

                Or

To change a Normal user to super user in UNIX/LINUX


  1. Create a new user  (Or select a exists user)
  2. Set id 0 in selected user attributes through /etc/passwd file like-
(Before Edit )     asharma:*:128:20::/home/asharma:/sbin/sh
(After Edit)         asharma:*:0:20::/home/asharma:/sbin/sh
    3. Save file and exit.
 Now your selected user works as root user.
----------------------------------------------------------------------------------------------------------

How to create directories or text files in sequence or numberwise 


How to Zip files in Linux

Suppose we have below mentioned files have to zip in a file named mohan.zip


Now you can check zip  file is there


For unzip a file run below command 


----------------------------------------------------------

For "command not found" error in HP UNIX-


PATH=$PATH:/usr/sbin:/usr/bin;export PATH

---------------------------------------------------------------------------------------

To check active user in web server-

ps -ef| grep httpd| wc -l


----------------------------------------------------------------------------------------


Defaults Ports: 

  • (Simple Mail Transfer Protocol) SMTP = 25
  • (Domain Naming System ) DNS = 53
  • (File Transfer Protocol) FTP = 20 and 21
  • (Dynamic Host configuration Protocol) DHCP = 67 and 68
  • (Secure Shell) SSH = 22
  • TELNET = 23
  • (Internet Message access Protocol) IMAP = 143
  • (Post office Protocol) POP3=110
  • (Remote Desktop protocol) RDP =3389
  • (Hyper Text Transfer protocol) HTTP = 80
  • (Secure connection for Hyper text transfer protocol) HTTPS = 443
  • (Network Time Protocol) NTP = 123
  • (Simple Network Mail Protocol) SNMP = 161
--------------------------------------------------------------------------------------------------------------------------
How to check WWN number in HP UNIX Server: -

# ioscan -fnC fc
Class     I  H/W Path     Driver S/W State   H/W Type     Description
===================================================================
fc        0  0/2/0/0/0/0  fcd   CLAIMED     INTERFACE    HP AD300A 4Gb Dual Port PCIe Fibre Channel Adapter (FC Port 1)
                         /dev/fcd0
fc        1  0/2/0/0/0/1  fcd   CLAIMED     INTERFACE    HP AD300A 4Gb Dual Port PCIe Fibre Channel Adapter (FC Port 2)
                         /dev/fcd1

#

There are HBA cards please select one by one: -

# fcmsutil /dev/fcd0
                           Vendor ID is = 0x1077
                           Device ID is = 0x2432
            PCI Sub-system Vendor ID is = 0x103C
                   PCI Sub-system ID is = 0x7041
                               PCI Mode = PCI Express x4
                       ISP Code version = 5.6.5
                       ISP Chip version = 3
                               Topology = PTTOPT_FABRIC
                             Link Speed = 4Gb
                     Local N_Port_id is = 0x010200
                  Previous N_Port_id is = None
            N_Port Node World Wide Name = 0x500143800635d77d
            N_Port Port World Wide Name = 0x500143800635d77c
            Switch Port World Wide Name = 0x200200051eef68bb
            Switch Node World Wide Name = 0x100000051eef68bb
              N_Port Symbolic Port Name = IGNITEBA_fcd0
              N_Port Symbolic Node Name = IGNITEBA_HP-UX_B.11.31
                           Driver state = ONLINE
                       Hardware Path is = 0/2/0/0/0/0
                     Maximum Frame Size = 2048
         Driver-Firmware Dump Available = NO
         Driver-Firmware Dump Timestamp = N/A
                                   TYPE = PFC
                         NPIV Supported = YES
                         Driver Version = @(#) fcd B.11.31.1503 Dec  3 2014
#

For checking LUN number

#insf
#ioscan -m lun

---------------------------------------------------------------------------------------------------------------------

To check all configuration like memory, hardware in HP-UX


# machinfo
CPU info:
   Intel(R) Itanium 2 9100 series processor (1.67 GHz, 18 MB)
   2 cores, 4 logical processors per socket
   666 MT/s bus, CPU version A1
          Active processor count:
          1 socket
          2 cores (2 per socket)
          2 logical processors (2 per socket)
          LCPU attribute is disabled

Memory: 16361 MB (15.98 GB)

Firmware info:
   Firmware revision:  04.11
   FP SWA driver revision: 1.18
   IPMI is supported on this system.
   BMC firmware revision: 5.25

Platform info:
   Model:                  "ia64 hp server rx2660"
   Machine ID number:      41485a06-aeb8-11df-b3f0-2d0c9141f936
   Machine serial number:  SGH50290JN

OS info:
   Nodename:  IGNITEBA
   Release:   HP-UX B.11.31
   Version:   U (unlimited-user license)
   Machine:   ia64
   ID Number: 1095260678
   vmunix _release_version:
@(#) $Revision: vmunix:    B.11.31_LR FLAVOR=perf
#



Introduction to Linux Part 1

Introduction to Linux Part 1

Introduction to Linux Linux is an operating system that works just like Windows and Mac OS X. As an operating system, Linux is a very h...