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

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
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.  www.redhat.com
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.


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 20

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
CPU monthly average? 12 132
llcommand 6 98
Shell script errors 10 141
UNiX Script filesystem space usage Part2 54 88
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…
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…
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…
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.

860 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