Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

The Root Password has been forgotten.  Can we recover?

Posted on 2001-08-28
4
Medium Priority
?
1,415 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 600 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

927 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