The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ask for root password dave123 Shell Programming and Scripting 8 01-22-2008 07:09 AM
I need it to prompt me for a root password, so I don't have to log as root lunchtime UNIX for Dummies Questions & Answers 2 06-25-2007 12:21 PM
how to access root priveliges if root password is lost wojtyla Linux 1 02-18-2005 03:24 AM
Lost root password / Can't login as root Perderabo Answers to Frequently Asked Questions 0 06-22-2004 04:40 PM
No root password cyno UNIX for Dummies Questions & Answers 6 08-14-2002 09:57 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-22-2005
Registered User
 

Join Date: Nov 2002
Location: pasadena
Posts: 74
Fortgot root password SCO 5.0.

hello guys The company i work for just got a new client, there old datebase is in Unix SCO openserver 5.0.5.
The manager of this new client can login but not as a root , they forgot there own root password. There old IT company never gave it to them and they have no way of getting a hold of them


I hope you guys can understand me , i'm not trying to hack into this systems, we are just trying to get there datebase to put it in our server.


Please this is a big client for our company , i hope you guys can help me with this problem.


Thanks a lot.
Reply With Quote
Forum Sponsor
  #2  
Old 07-22-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,664
Maybe this link will help.
From sap-basis-abap.com sco-unix-root-password
Quote:
SCO Unix Root Password

Adapted from the Unix Discussion Forum:

I want to know if there is any command to reset root password in SCO Unix. I'll be very grateful for the help.

This are the typical perms on a SCO dubba..

# ls -ld /tcb
8 drwxr-xr-x 5 root system 8192 Aug 10 02:28 /tcb
# ls -ld /tcb/files
8 drwxrwx--x 3 bin auth 8192 Aug 10 02:29 /tcb/files
# ls -ld /tcb/files/auth
8 drwxrwx--- 28 auth auth 8192 Oct 14 06:48 /tcb/files/auth
# ls -ld /tcb/files/auth/r
8 drwxrwx--- 2 auth auth 8192 Oct 14 07:00 /tcb/files/auth/r
# ls -l /tcb/files/auth/r/root
1 -rw-rw---- 1 auth auth 627 Aug 9 13:33 /tcb/files/auth/r/root

If you have any other logins coressponding to these owners of these files, su to them, rename the dir. recreate the root file,
(with a null password field) and simply log on!

Else:

First you need a SCO boot floppy with a minimal kernal, vi or ed, and mount on it. If you don't already have one, you can use a custom tailored Unix bootdisk for another UNIX (like Linux or FreeBSD) but this may a) not work or b) destroy your filesystem.

Boot the SCO from the boot disk and login to the default shell as root. At this point, none of the internal drives should be mounted.

Make a subdirectory on the floppy filesystem called recover or some such.
Mount the root partition of the drive to the recover subdirectory on the boot floppy in read/write mode.
You may have to use the FORCE mount option (which can KILL your root partition!) to get it to mount

After the root partition is mounted, it should be trivial to remove the password for the root account from the password table, save, unmount, reboot and remove the boot floppy.

Don't try to reset the root password, just clear out the password field.
Once you can bring the SCO back up (in single user!) then login as root, which may give you warnings but shouldn't ask for a password, and use the admin shell to set a new root password and rebuild the password file(s) correctly.

I have used a variant of this procedure to regain access to my firewall in similar circumstances.

Using a DOS driver for NTFS, much the same effect can be accomplished (with much more work) on an NT system.

Variants of this work for any system you can build the appropriate boot disk for. Also, afterwards, keep a spare "recovery" disk like this handy, but guard it well (i.e. a safe).

It is not a problem if you have emergency root and boot floppies for your SCO machines - if not, you are stuck. The only way around is to reload your os and reload your ''full'' system backups.

The problem lies in the fact that you need the root password to enter maintenance mode.

There are two ways to bypass the root password. The first is if the root entry in tcb is corrupt, and secondly if you have root and boot floppies so that you can purposely corrupt roots tcb entry.

I am going to assume that you do have a root and boot.

Firstly, as you cannot log in as root, power your system off.

Load the boot floppy into the drive and power on.

When prompted, load the root floppy.

At the prompt, check the bootdisk by:

# fsck -y /dev/hd0root

hd0root is a special device file purely for disaster recovery. Once fsck has finished, mount it

# mount /dev/hd0root /mnt

change to /mnt/tcb/files/auth/r rename root

# mv root root.old
# cd /
# umount /mnt
# halt

boot the machine.

When the machine comes up, sysinit is run from inittab and when it finds a problem with roots account, it starts up in single user mode without a password.

When you get control,

# cd /tcb/files/auth/r
# mv root.old root
# passwd root

Don't forget the password!

# cd /
# shutdown -y -go -i6

But of course, you need your emergency boot and root floppies!

I hope that this has been of some help to you.

P.S. SCO 5 is a lot easier as you can do it from the install media.

Last edited by RTM; 04-05-2006 at 06:22 AM.
Reply With Quote
  #3  
Old 07-25-2005
Registered User
 

Join Date: Nov 2002
Location: pasadena
Posts: 74
Quote:
Originally Posted by Perderabo
Maybe this link will help.


Thanks a lot from your response , i'm working on it i'll let you know if it works
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0