1846891 Members
3909 Online
110256 Solutions
New Discussion

Reset root password

 
SOLVED
Go to solution
nck2pg2
Advisor

Reset root password

I change the root password on one of the machine last week but I can't recall it. Could I reset root password?
11 REPLIES 11
Jerome Baron
Respected Contributor

Re: Reset root password

Hi,
restart the system in single user mode (HPUX -is) and edit /etc/passwd file. Remove paswword fields for root user.

It's the only way to change root password.

Regards,
Jerome
Rajeev  Shukla
Honored Contributor

Re: Reset root password

Only by booting the system in single usermode and then resetting the password.

Cheers
Rajeev
Ravi_8
Honored Contributor

Re: Reset root password

Hi,

get into single user mode
# passwd root

typein the new password
#init 3
never give up
KapilRaj
Honored Contributor

Re: Reset root password

Reboot the machine ...
Interupt the boot Process
bo
Interact with IPL Y/N : "Y" (Respawn Y)
hpux -is
here u will get the root login w/o supplying a password

#passwd root

or

#vi /etc/passwd
null the passwd field for root user.

kaps
Nothing is impossible
Jean-Louis Phelix
Honored Contributor

Re: Reset root password

hi,

Another possibility is if you remember a system listed in the root .rhost file whose password is lost, use rlogin from it (sometimes in service guard clusters for example, .rhost is used instead of cmclnodelist). Last hope before single user mode ... :^)

Regards.
It works for me (© Bill McNAMARA ...)
donne007
Regular Advisor
Solution

Re: Reset root password

Hi
Guys Are Right Over Here But If Your system is trusted and the Security Flag is set to ON in the Boot Menu . Her's the Info for you
Before Starting Remove the Power to The HDD and boot the Machine and from the
Main Menu> co
Main Menu> Configuration> Set Sec OFF
and Now connect the Power to HDD and Start the Machine. Now interrup the Sequence & Boot in Single User Mode If it's not a Trusted System it's Fine , If It's a Trusted System run this command
# /usr/lbin/tsconvert -r
(mount The /usr if not mounted )

Hope this shuld resolve ..

Good Luck
Asif
nck2pg2
Advisor

Re: Reset root password

Dear all,

Need urgent help. I went in with single user mode and do
# passwd root

it prompt me the old password.

Somehow when I null the /etc/passwd. It doesn't work also.

Getting worst is I cahnge one of my user account just now under single user mode (actually I tried this because the root promt for old password, so I did # passwd user, then I key in new password and everything was O.K.)
After reboot, try to login with the user then I get this

Account locked in the commercial security database. I can't do anything seems this is the only user account I have, Help please, week of trouble.
Michael Tully
Honored Contributor

Re: Reset root password

okay, looks like you have a trusted system.

# mount /usr
# /usr/lbin/modprpw -k root

Change the root password.
Anyone for a Mutiny ?
Armin Feller
Honored Contributor

Re: Reset root password

Hi,

are you connected to the system?

If YES, then untrust the system first:

?? From the SAM menu, I selected Auditing and Security -->
Audited Events --> Actions --> Unconvert System.

?? From cammandline
tsconvert -r

If NOT, I'm not sure what to do ;-(

Best regards,
Armin
Armin Feller
Honored Contributor

Re: Reset root password

1. Boot from the 10.20 CORE OS cdrom

2. Select run a recovery shell from menu. Say no to the
startup networking question.

The next steps involve running the command loadfile to acquire
the executable from the CD:

3. loadfile /sbin/pvcreate
4. loadfile /sbin/vgimport
5. loadfile /sbin/vgchange
6. loadfile /sbin/mknod If this command does not load, you can try
to access it when needed by using the full path.
7. loadfile mkdir

These files should allow creation of a LVM VG:

8. mkdir /dev/vg00
9. mknod /dev/vg00/group c 64 0x000000
10. vgimport /dev/vg00 /dev/dsk/cXtXdX (where the X's are
replaced with numbers to indicate the boot disk -- your configuration
may vary. Note that if there are multiple disks in the volume group,
all of the device files must be specified on one command line.)

To determine the correct disk device file:
a. loadfile ll
b. ll /dev/dsk
c. select the appropriate disk device file and use it in the vgimport
command

11. vgchange -a y /dev/vg00

If this went successfully then importation of the LVM VG is complete.
The next steps release some space in the RAM filesystem for future use.

12. rm /sbin/pvcreate
13. rm /sbin/vgimport
14. rm /sbin/vgchange

The next steps are to mount the root file system on the boot disk.
It may be either hfs or vxfs, change the relevant word in the loadfile
command to match:

15. loadfile /sbin/mount
16. loadfile /sbin/fs/hfs/mount
17. mkdir /myroot
18. mount /dev/vg00/lvol3 /myroot (this is assuming the /
filesystem is on lvol3 - it usually is, but no guarantees. Again, good
documentation is essential)

The next steps are to remove the unknown password from root's ID:

19. loadfile ex
20. loadfile vi
21. loadfile /usr/lib/libcurses.1
22. cd /myroot/tcb/files/auth/r
23. vi root
Here in vi find the stanza with u_pwd and remove the
encrypted password after the equal sign and before the colon. Leave the
other lines alone.
24. Save the file:
escape :wq
25. reboot
26. Perform the actions necessary to get to single-user mode - this will
vary based upon platform but essentially get to the ISL prompt and
enter the command "hpux -is"
27. The system will boot and finally ask for an ID - enter root.
28. When finished, verify the date. This procedure has been known to change
the system date.
nck2pg2
Advisor

Re: Reset root password

Dear all,

Done.

1. boot into single user mode.
2. /usr/lbin/tsconvert -r.
3. vi /etc/passwd, null the password.

Thank you.