Link to home
Start Free TrialLog in
Avatar of fantasma110899
fantasma110899

asked on

Root password lost...

Hi:

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?

Thanks
Avatar of chris_calabrese
chris_calabrese

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
Avatar of fantasma110899

ASKER

Chris:

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.

Thanks  
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
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
http://www.omnimodo.com
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.
Hi Chris,

SunOS versions up to SunOS 4.1.3 were based on AT&T's implementation.
ASKER CERTIFIED SOLUTION
Avatar of chris_calabrese
chris_calabrese

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

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

modulo

Community Support Moderator
Experts Exchange