If you forgot the root user password, then the only way to change it is by login in through single-user mode. Since VPAR is not a physical machine so it can’t be restarted directly. You have to login in to the VSP through NPAR management IP and then change the password.
1. log in to npar on which vpar is built using management IP. The default username/password is Admin/Admin. On successful login one will get the below menu:
MP MAIN MENU:
CO: Console
VFP: Virtual Front Panel
CM: Command Menu
CL: Console Log
SL: Show Event Logs
HE: Main Help Menu
X: Exit Connection
# hostname
TESTVSP1
3. Use command vparstatus to find all vpar’s status
# vparstatus
[Virtual Partition]
Num Name RunState State
=== ========================== ============ =========
1 machine1 UP Active
2 machine2 UP Active
3 machine3 UP Active
[Virtual Partition Resource Summary]
Virtual Partition CPU Num Num Total MB Floating MB
Num Name Min/Max CPUs IO Memory Memory
=== ========================== ======= ==== ==== ========= ============
1 machine1 1/512 2 5 16384 0
2 machine2 1/512 3 5 16384 0
3 machine3 1/512 2 6 16384 0
4. Let us suppose you want to change root user password of machine3.
#vparconsole -p machine3
vMP MAIN MENU
CO: Console
CM: Command Menu
CL: Console Log
SL: Show Event Logs
VM: Virtual Machine Menu
HE: Main Help Menu
X: Exit Connection
[machine3] vMP> CM
(Use Ctrl-X to return to vMP main menu.)
[machine3] vMP:CM> pc
Current System Power State: On
Power Control Menu:
C – Power Cycle
ON – Turn Power On
OFF – Turn Power Off
G – Graceful Shutdown
Enter menu item or [Q] to Quit: OFF
System will be powered off.
You must shut down the guest OS manually before this command is executed.
Failure to do this can cause problems when the guest OS is restarted.
Confirm? (Y/[N]): y
-> System is being powered off.
[machine3] vMP:CM> exit
5. Now when runstate of machine3 is DOWN and the state is Inactive. Again go to the console of machine3.
#vparconsole -p machine3
vMP MAIN MENU
CO: Console
CM: Command Menu
CL: Console Log
SL: Show Event Logs
VM: Virtual Machine Menu
HE: Main Help Menu
X: Exit Connection
[machine3] vMP:CM> pc
Current System Power State: Off
Power Control Menu:
C – Power Cycle
ON – Turn Power On
OFF – Turn Power Off
G – Graceful Shutdown
Enter menu item or [Q] to Quit: ON
System will be powered on.
Confirm? (Y/[N]): Y
-> System is being powered on.
Please wait for the vPar or VM start sequence to complete. Use of the attention
character can prevent the vPar or VM from running.
<Press ma at this stage>
(C) Copyright 2000 – 2013 Hewlett-Packard Development Company, L.P.
Mapping vPar/VM memory: 16384MB
mapping RAM (0-400000000, 16384MB)
.
/opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/bf4a7470-d390-11e2-a206-d4c9ef060500/vmm_config.current): Allocated 17179869184 bytes at 0x6000000100000000
locking memory: 0-400000000
allocating overhead RAM (6000000500000000-6000000508000000, 128MB)
locking memory: 6000000500000000-6000000508000000
allocating datalogger memory: FF800000-FF900000 (1024KB)
allocating firmware RAM (fff00000-100000000, 1024KB)
locked SAL RAM: 00000000fff00000 (8KB)
locked ESI RAM: 00000000fff02000 (8KB)
locked PAL RAM: 00000000fff04000 (8KB)
locked Min Save State: 00000000fff0a000 (4KB)
locked datalogger: 00000000ff800000 (1024KB)
Creation of VM minor device 3
Device file = /var/opt/hpvm/uuids/bf4a7470-d390-11e2-a206-d4c9ef060500/vm_dev
Loading boot image
Image initial IP=102000 GP=69E000
Starting event polling thread
guestStatsStartThread: Started guestStatsCollectLoop – thread = 6
Starting thread initialization
Daemonizing….
vparboot: Successful start initiation of vPar or VM ‘machine3’
6. Go to single-user mode and change the password of the user root
passwd root
[machine3] vMP>
vMP MAIN MENU
CO: Console
CM: Command Menu
CL: Console Log
SL: Show Event Logs
VM: Virtual Machine Menu
HE: Main Help Menu
X: Exit Connection
[testav] vMP> co
(Use Ctrl-X to return to vMP main menu.)
– – – – – – – – – – Prior Console Output – – – – – – – – – –
Starting: HP-UX Primary Boot: 0/0/0/0/0.0×0.0x0
(C) Copyright 1999-2012 Hewlett-Packard Development Company, L.P.
All rights reserved
HP-UX Boot Loader for IPF — Revision 2.047
Press Any Key to interrupt Autoboot
EFIHPUXAUTO ==> boot vmunix
Seconds left till autoboot – 5
– – – – – – – – – – – – Live Console – – – – – – – – – – – –
3
Type ‘help’ for help
<clt+C>
HPUX> hpux -is ————————-command to boot in single user mode
> System Memory = 16378 MB
loading section 0
………………………………………………………………. (complete)
loading section 1
…………….. (complete)
loading symbol table
loading System Directory (boot.sys) to MFS
…..
loading MFSFILES directory (bootfs) to MFS
……………………………..
Launching /stand/vmunix
SIZE: Text:37146K + Data:8430K + BSS:27169K = Total:72746K
Console is on virtual console – via PCDP
Booting kernel…
HP-UX will call firmware in physical-addressing mode
Loaded ACPI revision 2.0 tables.
Using /stand/ext_ioconfig
Memory Class Setup
————————————————————————-
Class Physmem Lockmem Swapmem
————————————————————————-
System : 15578 MB 15578 MB 15578 MB
Kernel : 15578 MB 15578 MB 15578 MB
User : 14631 MB 12970 MB 13021 MB
————————————————————————-
ktracer is off until requested.
spinlock ALAT switching supported on this system
Installing Socket Protocol families AF_INET and AF_INET6
Kernel EVM initialized
sec_init(): kernel RPC authentication/security initialization.
secgss_init(): kernel RPCSEC_GSS security initialization.
rpc_init(): kernel RPC initialization.
rpcmod_install(): kernel RPC STREAMS module “rpcmod” installation. …(driver_install)
NOTICE: nfs_client_pv3_install(): nfs3 File system was registered at index 10.
NOTICE: nfs_client_pv4_install(): nfs4 File system was registered at index 11.
NOTICE: cachefsc_install: cachefs File system was registered at index 13.
hpvmguestdvr load completed.
Boot device’s HP-UX HW path is: 0/0/0/0/0.0×0.0x0
igssn0: INITIALIZING HP IGSSN PCI AVIO LAN Adapter at hardware path 0/0/0/1/0
igssn1: INITIALIZING HP IGSSN PCI AVIO LAN Adapter at hardware path 0/0/0/2/0
AF_INET socket/streams output daemon running, pid 65
afinet_prelink: module installed
Starting the STREAMS daemons-phase 1
LVM: Root VG activated
Swap device table: (start & size given in 512-byte blocks)
entry 0 – major is 64, minor is 0x2; start = 0, size = 50724864
System Console is Virtual for HPVM Guest
Checking root file system.
log replay in progress
replay complete – marking super-block as CLEAN
Root check done.
Create STCP device files
Starting the STREAMS daemons-phase 2
$Revision: vmunix: B.11.31_LR FLAVOR=perf
Memory Information:
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 16771124 Kbytes, lockable: 12013700 Kbytes, available: 13715264 Kbytes
/sbin/ioinitrc:
/dev/vg00/lvol1:log replay in progress
/dev/vg00/lvol1:replay complete – marking super-block as CLEAN
/sbin/krs_sysinit:
* The module ‘pciinfo’ has been loaded.
* The module ‘rng’ has been loaded.
insf: Installing special files for ipmi instance 0 address 0/250/1
INIT: Overriding default level with level ‘s’
INIT: SINGLE USER MODE
INIT: Running /sbin/sh
7. Now enter the new password for root user
# passwd root
<new password>
reenter password
<new password>
7. Reboot the system by using reboot command.
# reboot
Your password successfully has been changed, now you can log in to the system.
Related Posts
- How to Find NIC (Network Interface Card) Details in HP-UX
- How to Install a .depot Package Using swinstall on HP-UX
- HP-UX: How to restrict NFS share access to a particular server?
- crontab: you are not authorized to use cron. Sorry. in HP-UX
- HP-UX: SSH taking too much time after adding the DNS Servers
- How to add DNS servers on an HP-UX server
- How to login to vPar console in HP-UX
- How to extend the size of Logical Volume (LV) in HP-UX
- How to determine file system type in HP-UX using command
- How to check vPar machines status in HP-UX
- How to find HBA cards/ports and WWN Number details in HP-UX (nPar)
- How to find HBA cards/ports and WWN Number details in HP-UX (vPar)
- HP-UX command to get Physical Memory Information
- HP-UX command to get Processor Information
- HP-UX command to get Hardware Serial Number
- su: Sorry in HP-UX while switching from normal user to root user
- SSH login taking too much time on HP-UX 11.31
- How to Disable Root SHH Login in HP-UX?
- hpvmstatus: HPVM currently not running.
- How to view/print routing table in HP-UX?
- Create a Logical Volume larger than 2TB and format it in HP-UX
- Protect SSH Logins with SSH and MOTD Banner Messages in HP-UX
- Remove welcome message after login in HP-UX 11.31
- Create a Logical Volume and format it in HP-UX
- How to rescan new LUNs added in HP-UX 11.31
- How to reboot a HP-UX machine?
- How to remove File System, LV and VG in HP-UX and Linux?
- How to remove NO_HW devices from ioscan in HP-UX without a reboot?