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.

Unix, Xenix and ODT General FAQ

How do I reset the root password if I forget it? (part 1)

See Lost Root Password for all three articles combined.


Hate these ads?

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/sh

Edit out the encrypted password (don't touch anything else!) so that the line reads something like

root::0:0:God,Everywhere:/:/bin/sh

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.



Comments /SCOFAQ/FAQ_scotec1root_1.html
FAQScoTecOnerootOne :

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


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 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...


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.




Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


ad

Views for this page
Today This Week This Month This Year  Overall
8830010,208 33,819

/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.

Publishing your articles here

More:
       - FAQ




Unix/Linux Consultants

Your ad here - $24.00 yearly!

SCO, OpenServer, UnixWare, software, servers, security, networks, installation, administration, troubleshooting, maintenance, Watchguard, firewalls, VPNs, e-mail. Visit us at http://opensystemscomputing.com and www.go2unix.com.


UBB Computer Services Support for Openserver, Unixware and Linux. Windows integration with Unix/Linux servers. Hardware, Backup and Networking issues. Located near Sacramento CA, we provide onsite support throughout Northern CA and Nationwide via remote access. We are a SCO Authorized Partner and a Microlite BackupEdge Certified Reseller.


http://www.m3ipinc.com Security, firewalls, ids, audits, vulnerability assesments, BS7799, HIPAA, GLB, incident handling




Twitter
  • Jun 26 21:28
    Lost 5 cents at poker tonight. Hard to do with 10 and 20 cent betting..
  • Jun 23 07:01
    Hypermiling:









Change Congress

Related Posts