Operating System - HP-UX
1829612 Members
1707 Online
109992 Solutions
New Discussion

Sigle user mode and password.

 
Jonny_2
Occasional Advisor

Sigle user mode and password.

Hi ,
I am new to Hp-ux.But i have some experience with solaris.
1)How can i come to single user mode form runlevel 3(ex init s or 1 in solaris)
2)where the passwd's will be stored( eg:/etc/shadow inn solaris)
3)To modify kernel which file i have to modify and if it is not able to boot means how can i boot with original file( like boot -a and give original /etc/system file name in solaris).
Dont think i am asking too basic questions ,I am new to it..
4 REPLIES 4
Christopher McCray_1
Honored Contributor

Re: Sigle user mode and password.

Hello,

1) do a shutdown -r and when the system is coming up and asks if you want to interrupt the boot process, do it. Then at the ISL prompt, type hpux -is and answer N to interact with ISL.

2) this is in /tcb/files/auth/# (the first character of the users login)

3) the file is /stand/system and if you have to boot from the previous kernel, you should have named moved it to another name previous to reboot; the comand is :

hpux (;0)/stand/vmunix.prev (orwhateve you called it, this is the default when using sam)

If you use sam to modify the kernel, this is all done for you, eliminating some of the steps.

Hope this helps

Chris
It wasn't me!!!!
Martin Johnson
Honored Contributor

Re: Sigle user mode and password.

1) shutdown (see man 1m shutdown)

2) assuming a trusted system:
/tcb/files/auth/a/username where ../a/.. is the first letter of the username, for example root is /tcb/files/auth/r/root.

3) Use SAM. SAM will check limits and dependencies.

HTH
Marty
V. V. Ravi Kumar_1
Respected Contributor

Re: Sigle user mode and password.

hi,
1. to boot in single user mode (from runlevel3)
init s
2. there is no concept of shadow in HP-Ux. passwords are stored in /etc/passwd only.
3. to modfiy kernel better u do it SAM.
SAM - Kernel Configuration - configurable parameters - select - actions - modify
u can boot with alternate kernel path if the modified kernel won't work.
procedure:
HP-UX: Booting from an alternate kernel

Press a key, while PDC is waiting for the 10 seconds manual overide.

Autosearch for boot path enabled

To override, press any key with 10 seconds.


Boot from primary boot path (Y or N)?> N
Boot from alternate boot path (Y or N)?> N
Enter boot path, comman, or ?>

console>boot
Interact with IPL (Y or N)?>Y

Booting...
Boot IO Dependent Code (IODC) revision 4

Hard Booted

ISL Revision A.00.38 Oct 26, 1994

ISL>hpux boot disk()/stand/vmunix.prev

regds

Never Say No
Wodisch_1
Honored Contributor

Re: Sigle user mode and password.

Hi Jonny,

in addition to what the other wrote:
- "init s" or "shutdown now" does NOT work reliably any more - you have to boot into single-user mode, today!
- since you did not tell us, wether your system is "trusted". If yes, then use commands like "/usr/lbin/modprpw", else the passwords are stored in the second filed of "/etc/passwd" - no "/etc/shadow" on HP-UX!
- use "SAM" to create the new kernel. If it does not work, abort the boot process when the "you have 10 seconds" message appears. Then load the ISL (Initial System Loader, or so) interactively and at the "ISL>" prompt enter "hpux ls". This will show all the files in "/stand" (the boot filesystem of HP-UX). There should be a "vmunix" (the BAD one) and a "vmunix.prev" (the old and hence GOOD one). After about 60s the screen clears automagically, so read fast ;-) When the "ISL>" prompt reappeared enter "hpux -is /stand/vmunix.prev" (or whichever you have seen before and wnat to use now). As soon as you are in the single-user shell, copy "/stand/vmunix.prev" BACK to "/stand/vmunix" - even before you "mount -a" and use "SAM" to create a *better* kernel...

BTW, the "/etc/system" equivalent of HP-UX is "/stand/system" (textfile, too), but you have to compile and link the new kernel anyway - rebooting alone is NOT enough!

HTH,
Wodisch