APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Unix, Xenix and ODT General FAQ

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

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

See Lost Root Password (SCO) 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 https://www.aplawrence.com/Linux/lostlinuxpassword.html

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 https://aplawrence.com/cgi-bin/ta.pl?arg=105094

Edit /mnt/etc/passwd. The first line will be your root line, such as


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

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> (SCO Unix) How do I reset the root password if I forget it? (part 1)

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

/mnt/bin/chroot /mnt /bin/sh

chroot: not found

Any help on this would be so appreciated!


Sat Jun 25 10:12:22 2005: 539   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....


Wed May 18 19:46:53 2005: 541   RJB

What is N1 / N2..?

Wed May 18 20:07:48 2005: 544   TonyLawrence

gravatar (

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: 663   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 (link)

See (link) for mounting the original drive as a secondary, then proceed with the instructions above.

Sat Jun 25 11:07:56 2005: 716   TonyLawrence

You mean if you are already logged in as root? Just type "passwd".

Thu Sep 29 16:46:14 2005: 1133   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: 1136   TonyLawrence

I'm not saying to use a program named "edit" - use whatever editor you want.

Sat Aug 21 03:26:24 2010: 8923   ovi


i forget my linux mail server's root password. how can i collect this or solve it. plz tell me easy way and details command, becz i am a new user. plz help me

Sat Aug 21 10:49:21 2010: 8924   TonyLawrence


The second sentence told you where to go to find information on resetting Linux passwords: (link)

If you had bothered to read anything, you would not have had to wait for an answer. Is reading THAT difficult today??


Printer Friendly Version

Have you tried Searching this site?

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.

Contact us

Printer Friendly Version

Securing a computer system has traditionally been a battle of wits: the penetrator tries to find the holes, and the designer tries to close them. (Gosser)



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode