Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)
Showing posts with label password. Show all posts
Showing posts with label password. Show all posts

Tuesday, July 30, 2024

How to create bootable USB in solaris

How to Create a Bootable USB (Pen Drive) in Solaris

Creating a bootable USB in Solaris is a crucial task for system administrators, especially when dealing with server recovery, new installations, or maintenance scenarios. Whether you're recovering a root password or booting a server from ISO media, having a bootable USB ready can save valuable time.


Why Is It Required?

There are several scenarios where booting from a USB ISO image becomes necessary:

  • Root password recovery
  • Fresh OS installation
  • Server in maintenance mode
  • Booting from ISO for troubleshooting

Step-by-Step Guide

Step 1: Download the Solaris ISO

Search on Google:
Solaris 11.4 ISO download

Choose the correct ISO based on your server architecture:

  • SPARC → Download SPARC USB Text Installer
  • X86 → Download X86 USB Text Installer

For SPARC hardware, download:

SPARC Text Installer ISO

Step 2: Transfer ISO to a Test Solaris Server

Once downloaded, copy the ISO to a working Solaris server.


root@cdom3:~# ls -lrth
-rw-r--r--   1 root     root        1.1G Jul 18 13:09 sol-11_4-text-sparc.usb
root@cdom3:~#

Step 3: Write ISO to USB Drive

Insert the USB drive into the test server and run:

root@cdom3:~# usbcopy sol-11_4-text-sparc.usb

You’ll see output like:

image type: dd-able Sparc
Found the following USB devices:
0:      /dev/rdsk/c9t0d0s2      14.7 GB SanDisk  Cruzer Blade     1.00
Enter the number of your choice: 0

WARNING: All data on your USB storage will be lost.

Are you sure you want to install to
SanDisk Cruzer Blade 1.00, 14700 MB at /dev/rdsk/c9t0d0s2 ?  (y/n) y
Copying and verifying image to USB device
Finished 1160 MB in 234 seconds (4.9MB/s)
Successfully completed copy to USB


Step 4: Remove USB and Insert into Target Server

Once the image is successfully copied, remove the USB from the test server and insert it into the target server (in maintenance mode).


Step 5: Boot Server from USB

At the OK prompt, scan for connected devices

{0} ok probe-scsi-all       

Target 9
  Unit 0   Disk   HITACHI  H109030SESUN300G A606    585937500 Blocks, 300 GB
  SASDeviceName 5000cca043487328  SASAddress 5000cca043487329  PhyNum 0
Target a
  Unit 0   Disk   HITACHI  H109030SESUN300G A606    585937500 Blocks, 300 GB
  SASDeviceName 5000cca043487400  SASAddress 5000cca043487401  PhyNum 1

/pci@340/pci@1/pci@0/pci@3/usb@0/hub@8/storage@1
  Unit 0   Removable Disk     SanDiskCruzer Blade1.00

Identify the USB device:

{0} ok devalias
Select the USB disk (e.g., option h) and create a device alias:
{0} ok show-disks
a) /reboot-memory@0
b) /pci@380/pci@1/pci@0/pci@7/SUNW,qlc@0,1/fp@0,0/disk
c) /pci@380/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,0/disk
d) /pci@380/pci@1/pci@0/pci@6/SUNW,qlc@0,1/fp@0,0/disk
e) /pci@380/pci@1/pci@0/pci@6/SUNW,qlc@0/fp@0,0/disk
f) /pci@3c0/pci@1/pci@0/pci@2/scsi@0/disk
g) /pci@300/pci@1/pci@0/pci@2/scsi@0/disk
h) /pci@340/pci@1/pci@0/pci@3/usb@0/hub@8/storage@1/disk
i) /iscsi-hba/disk
q) NO SELECTION
Enter Selection, q to quit: h
/pci@340/pci@1/pci@0/pci@3/usb@0/hub@8/storage@1/disk has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
         for creating devalias mydev for /pci@340/pci@1/pci@0/pci@3/usb@0/hub@8/storage@1/disk
Boot from the USB:
{0} ok boot mydev
Boot device: /pci@300/pci@1/pci@0/pci@2/scsi@0/disk@p0  File and args: mydev
/
If that fails, boot directly using the full device path:
{0} ok boot /pci@340/pci@1/pci@0/pci@3/usb@0/hub@8/storage@1/disk

Conclusion

Creating a bootable USB in Solaris is straightforward but powerful. It enables administrators to recover, reinstall, or troubleshoot servers efficiently. Always ensure you select the correct ISO and verify the USB copy process before proceeding.


Regards,

Kiren Jadhav

Friday, June 21, 2024

Unable to do root login even after entering correct root password in solaris 11


Unable to ssh root user even after entering correct root password in solaris 11


After doing OS installation on physical server or ldom/zones, we try to login using root user but sometimes it fails even though we use correct root password. And if we try to login via console using same password then we will be able to login.

This means there is nothing to do with password, something need to be changed in sshd configuration file. Here is the solution:

1.       Note down PermitRootLogin value in /etc/ssh/sshd_config file



1.       Take backup of /etc/ssh/sshd_config file.

#cp -rp /etc/ssh/sshd_config /etc/ssh/sshd_config_15mar2024

 

2.       Edit sshd_config file using vi editor and change PermitRootLogin and PasswordAuthentication value to yes

1




Restart ssh service



Thanks,

Kiren Jadhav

Thursday, July 21, 2022

Password less ssh for root user from compute node to all cell nodes

 Password less ssh for root user from compute node to all cell nodes:


Instead of copying the public key from the compute nodes to the autorizedkeys file of all the cell nodes; below command can be used for password less ssh for root user from the compute nodes to all the cell nodes.

Where /opt/oracle.SupportTools/onecommand/cell_group is the file where list of cellnodes is present.

#dcli -g /opt/oracle.SupportTools/onecommand/cell_group -l root -k -s '-o StrictHostKeyChecking=no'  


(Assuming ssh key is already present if not then run command #ssh-keygen -t rsa  )


To Verify password less is happening for all cells using uptime command.

#dcli -g /opt/oracle.SupportTools/onecommand/cell_group -l root uptime


===================================================================================

[root@dbadm01 onecommand]# dcli -g /opt/oracle.SupportTools/onecommand/cell_group -l root -k -s '-o StrictHostKeyChecking=no'

root@celadm01's password:

root@celadm02's password:

celadm01: ssh key added

celadm02: ssh key added

[root@dbadm01 onecommand]#

[root@dbadm01 onecommand]# dcli -g /opt/oracle.SupportTools/onecommand/cell_group -l root uptime

hcprd2celadm01: 12:57:01 up 165 days, 20:52,  0 users,  load average: 1.35, 1.91, 1.92

hcprd2celadm02: 12:57:01 up 165 days, 12:49,  0 users,  load average: 2.91, 2.15, 1.97

[root@dbadm01 onecommand]#

===================================================================================


Password less ssh for root user from compute node to all compute nodes:

Where /opt/oracle.SupportTools/onecommand/dbs_group is the file where list of compute nodes mentioned.

#dcli -g /opt/oracle.SupportTools/onecommand/dbs_group -l root -k -s '-o StrictHostKeyChecking=no'

#dcli -g /opt/oracle.SupportTools/onecommand/dbs_group -l root uptime



Regards,

Kiran Jadhav

Monday, February 9, 2015

Password cannot be circular shift of logonid +HPUX

Error : Password cannot be circular shift of logonid
******************************************

hpuxsrv:/> passwd kalyanjit
Changing password for kalyanjit
Last successful password change for kiren: Thu Feb  5 15:06:04 2015
Last unsuccessful password change for kiren: NEVER

New password:
Password cannot be circular shift of logonid.


Trick:


testhpux:/sbin/passwd kalyanjit
New password:
Re-enter new password:

Reason: /sbin/passwd -  it allows to change the password even if it is changed 5 minutes before also. 


Thanks...
Kalyanjit


**Let's Share our knowledge and keep visiting here**

Tuesday, December 2, 2014

Command to check when root password was changed - HPUX

Command to check when root password was changed:

myserver:/> /usr/lbin/getprpw -m spwchg root
spwchg=Fri Nov  7 09:06:37 2014


orgetprpw -m spwchg {username}

where:

-m  Displays the value for the argument passed

spwchg - last sucessful password change time


We can use following parameters  with -m option.

      uid        - get the users uid

      mintm      - get the minimum time between password changes

      maxpwln    - get the maximum password length for this user

      exptm      - get password expiration time

      lftm       - get password lifetime

      upwchg     - last unsucessful password change time

      acctexp    - get account expiration time

      llog       - last login time interval


      expwarn    - password expiration warning time


Thanks for reading!

Kiran Jaddhav

Thursday, August 28, 2014

Reason: password lifetime has passed + HPUX

Error:

#password

Password cannot be changed. Reason: password lifetime has passed.



Solution:


1. check the lockout condition for that user by command #/usr/lbin/getprpw

lockout=1001000

The position, left to right represents:

1 past password lifetime

2 past last login time (inactive account)

3 past absolute account lifetime

4 exceeded unsuccessful login attempts

5 password required and a null password

6 admin lock

7 password is a *


2. To reset the password age to zero

# /usr/lbin/modprpw -v {username}


3. Then unlock the user account

# /usr/lbin/modprpw -k {username}

or #/usr/lbin/modprpw -m alock=no -k username


4. If the problem persist then check the /tcb/files... for a particular user. May be it has been corrupted.

so manually edit the password there.


Thanks...
Kiran Jadhaw

**Let's Share our knowledge and keep visiting here**