Solved

The Root Password has been forgotten.  Can we recover?

Posted on 2001-08-28
4
1,381 Views
Last Modified: 2007-11-27
Bonehead move here.  The root password on our HPUX system has been forgotten.  Is there any way to reset it?  Using the "passwd root" command prompts for the current password and we don't know what it is.  We can gain root privledges, so is there any way to edit the passwd file and reset the root password to no password?
0
Comment
Question by:lightfootd
4 Comments
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 6435337
I have Solaris ...

 1. make df -k anw look who is mount /

 2. Boot from cdrom (The system mind is root)

 3.  mount /dev/dsk/c0t0d0s0 /a
     Example: /dev/dsk/c0t0d0s0 )

 4. With vi blank value for the password in the /etc/shadow

 5. umount /

 6. boot
0
 
LVL 38

Accepted Solution

by:
yuzh earned 150 total points
ID: 6435674
Hi lightfootd,

  >boot
  Interact with IPL ? Y
  SL>hpux -iS
  vi /tcb/files/auth/r/root
  vi /etc/shadow

  Note: use vi editor to delete the Password from the above files. then reboot your system. After system is booted up, the root have no passwd
, just type <Enter>, you need to use passwd command to reset the password.

   Cheers!
0
 
LVL 6

Expert Comment

by:bira
ID: 6436509
If anyone knows how to do it on AIX i am intersted
0
 

Author Comment

by:lightfootd
ID: 6437430
Editing those files did the trick.  Thanks.  However, I was not able to boot up in single user mode due to being asked for a login - and the only authorized login for single user mode is root.  So I just booted the system up normally, backdoored my way to root with "wrap_uid su - root" then edited the files you listed above - and it worked.
Thanks again....
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now