This article is from a FAQ concerning SCO operating
systems. While some of the information may be applicable to any OS,
or any Unix or Linux OS, it may be specific to SCO Xenix, Open
Desktop or Openserver.
There is lots of Linux, Mac OS X and general Unix info elsewhere on
this site: Search this site is the best
way to find anything.
See Lost Root Password for all three articles combined.
For Linux, see Linux/lostlinuxpassword.html
This procedure will work for Xenix, and for Unix as well if you are using a very relaxed security level (one which stores encrypted passwords directly in /etc/passwd). If you're using a higher security level on Unix, look for part 2 below.
For Linux, see http://www.aplawrence.com/Linux/lostlinuxpassword.html
For Unixware 2.12, http://aplawrence.com/Bofcusm/2438.html adds some useful info.
Boot the system from your emergency boot diskettes (if you didn't make these and keep them up to date, shame on you, but you should be able to use N1/N2 instead, and see the entry on crashing out of these diskettes below). Next,
mount /dev/hd0root /mnt
; this will mount your hard drive's root filesystem on /mnt.
On some v5.0.x systems, /dev/hd0root won't exist. Create it with
mknod /dev/hd0root b 1 42
See also http://aplawrence.com/cgi-bin/ta.pl?105094
Edit /mnt/etc/passwd. The first line will be your root line, such as
root:encryptedpasswordgoeshere:0:0:God,Everywhere:/:/bin/shEdit out the encrypted password (don't touch anything else!) so that the line reads something like
Save the file and shut down. Reboot from the hard drive. Your root password has now been removed, and you can reset it normally.
Also see /Boot/defs.html#bootfloppy.
/SCOFAQ/FAQ_scotec1root_1.html copyright 1997-2003 (various) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
how does one edit the passwd file?
any command issued from the new mount results into a :not found message. Ex.:
/mnt/bin/ed /mnt/etc/passwd
ed: not found
or
/mnt/bin/chroot /mnt /bin/sh
chroot: not found
Any help on this would be sooo appreciated!
Mat
How does one edit the passwd file?
any command issued from the new mount results into a :not found message. Ex.:
/mnt/bin/ed /mnt/etc/passwd
ed: not found
or
/mnt/bin/chroot /mnt /bin/sh
chroot: not found
Any help on this would be so appreciated!
Mat
Sat Jun 25 10:12:22 2005: Subject: root password.. RJB
What would be the "normal" way to reset root password. Since you need to be root to change it. But I'm fairly new at this....
Thanks...
Wed May 18 19:46:53 2005: Subject: root password RJB
What is N1 / N2..?
Wed May 18 20:07:48 2005: Subject: TonyLawrence
65.96.14.162 (
This comment got tagged as spam by my spam filter.
Always preview your comments before posting. Excessive links without accompanying text or insufficient text will trigger this.)
Fri Jun 17 17:29:12 2005: Subject: TonyLawrence
If you don't have luck with anything else, consider installing onto a new hard drive and then mounting your original drive as a secondary.
You probably cannot do this with Linux! (can't mount a SCO disk with Linux) See http://aplawrence.com/SCOFAQ/FAQ_scotec1linuxfs.html
See http://aplawrence.com/SCOFAQ/FAQ_scotec6recoverdrive.html for mounting the original drive as a secondary, then proceed with the instructions above.
Sat Jun 25 11:07:56 2005: Subject: TonyLawrence
You mean if you are already logged in as root? Just type "passwd".
Thu Sep 29 16:46:14 2005: Subject: anonymous
You are very helpful, i have used this site for a few problems. I just wanted to point out that you have a capitalized E on Edit and it should be lower case because the terminal is case sensitive.
Thu Sep 29 19:26:06 2005: Subject: TonyLawrence
I'm not saying to use a program named "edit" - use whatever editor you want.
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar