Root password lost...

Posted on 2002-03-28
Last Modified: 2011-09-20

How can I recover my root password without having to boot from the CD-ROM or floppy? I am using a AT&T UNIX SVR4 server. is there some kind of single user mode in this unix version?

Question by:fantasma110899
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 14

Expert Comment

ID: 6905027
First off, if you're using AT&T Unix sVr4, this is a product that hasn't been sold in over 10 years!

Ok, meanwhile, there is a recovery disk/tape that you're supposed to have to reboot/rebuild the machine if it gets really hosed.

If you don't have that, you can still probably go into single user mode.  My memory's fuzzy, but I think you'd power cycle, interrupt the boot sequence (the boot messages should tell you how to do this) and use 'boot -s'.  However, you might need the root pass in single user mode if things were locked down.

Another option is to break into the root account through security holes in that distribution.  Here are some I can think of
o sendmail wiz command
o send mail to the 'uudecode' account with a uuencoded copy of a setuid copy of ksh
o crontab -e as regular user and then create a new crontab for a root-equiv (uid 0) user that doesn't already have a crontab (by simply switching to a file with the right name in the editor) and creating a crontab entry that creates a setuid copy of ksh in /tmp once every five minutes or something

Author Comment

ID: 6906081

Could you explain me in details the first solution? I can't log in as a diferent user because there is not other user( or I don't have any other username). This old Unix came with some old systems donated to my company and I am just trying to save it for learning purposes.

LVL 14

Expert Comment

ID: 6906221
Don't bother.  Get yourself a junked 486 (possibly even this machine depending on the hardware) and load Linux on it.  Something like RedHat 7.2 is a lot closer to what you'll find out there in the real world these days, and it's totally free and well supported.
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI


Expert Comment

ID: 6915723
You could just take the disk out and mount it on a different box.  Then you could edit the passwd file.

If it has a CDROM/tape drive or you have an external one you should be able to boot from CD or a cartridge tape.  

Is it a Sun box?  If so, interrupt the boot sequence using Stop+A or L1+A.  At the '>' prompt enter:

b -s cdrom

Reminds me of my old days in Motorola.

please advise,

Regards, Nisus
LVL 14

Expert Comment

ID: 6916524
fantasma already stated that it's AT&T sVr4 (i.e., not a Sun), and that he doesn't have recovery disks/tapes.

But putting the disk in another machine is a good idea.  The root filesystem is probably either BSD FFS or s5fs, both of which you should be able to grok on a Linux or BSD system with appropriate filesystem drivers loaded.

Expert Comment

ID: 6917446
Hi Chris,

SunOS versions up to SunOS 4.1.3 were based on AT&T's implementation.
LVL 14

Accepted Solution

chris_calabrese earned 50 total points
ID: 6917834
True, but it doesn't identifiy itself as "AT&T System V Release 4".  Only the AT&T releases for the 3b2 and i386 did that.
LVL 21

Expert Comment

ID: 7833567
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by chris_calabrese

Please leave any comments here within the next 7 days


tfewster (I don't work here, I'm just an Expert :-)

Expert Comment

ID: 7908999
Finalized as proposed


Community Support Moderator
Experts Exchange

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

624 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