Link to home
Start Free TrialLog in
Avatar of Rick
Rick

asked on

Can't login - Sco Unix Openserver 5.0.6

Hello,

I can't login to my server using root or any other account.
When I try to login as root, I get "Please try again".
When I try to login using a different user account, I get "Cannot access terminal control database entry".

Tried rebooting... it goes through fsck, but I get the same thing.

SCO Unix Openserver 5.0.6

Thanks,
Rick
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

can you login as root in single user mode?

have you encountered system crash?
Avatar of Rick
Rick

ASKER

I don't know.... how do I login in single user mode?
I think when you boot the system the first thing is it shows you option to login to single user mode
Avatar of Rick

ASKER

OK. I can't login in single user mode.
did your system encounter a crash recently?
I think you need to boot from CD and break out to a shell:
http://wdb1.sco.com/kb/showta?taid=105094

Then you need to mount and chroot the drive:
mount /dev/hd0root /mnt
cd /mnt
chroot .

(you may need to specify the path to chroot)


Then run these commands:
http://osr507doc.sco.com/en/OSAdminG/ssT.cantaccess.html
Avatar of Rick

ASKER

It is giving me a:

mount: Bad Address


Thanks,
Rick
Avatar of Rick

ASKER

After I identified the installation and media devices, the next screen should be asking me for the keyboard type, but I'm getting this instead:

"There is no response from the controller for the device that you have selected.
Please be sure that your device is properly configured and
powered on and that it matches the parameters that you selected in the previous screen."

What I have on the previous screen is:

Media device to be used:  IDE CD ROM

IDE Controller:  Primary

Master or Slave:  Slave



Thanks,
Rick
Avatar of Rick

ASKER

I changed it to Master. So it let me through the next screen.

I tried the following command:

mount /dev/hd0root /mnt

but I get:

mount: Bad address


Thanks,
Rick

from:

http://aplawrence.com/Bofcusm/1461.html


> In order to access the root filesystem you will have
> to re-create the device node:
> # mknod /dev/root b 1 42

> To run a filesystem check on the root filesystem:
> # fsck -o full /dev/root

> To mount the root filesystem:
> # mount /dev/root /mnt



You may also be able to run divvy and give the slices names and then mount them by the names you gave them - you only want the root filesystem.  That is described here:

http://aplawrence.com/Unixart/lost_root_password.html
Avatar of Rick

ASKER

OK... I recreated the device node (mknod /dev/root b 1 42)
When I try to mount the hard drive's root filesystem on /mnt (mount /dev/root /mnt), I get:

mount: Device Busy

Does it take a while for the device node to be recreated?


Thanks,
Rick






Avatar of Rick

ASKER

I said it wrong. This is what I got:

I ran mknod/dev/root b 1 42

When I run mount /dev/root /mnt, I get "mount: Device busy"

When I run mount /dev/hd0root /mnt, I get "mount: Bad address"


Thanks,
Rick
No mknod should run fast - it's just creating the device node, not touching the disk itself.  I assume if you just run "mount" it does not show up as mounted already.  You might need to fsck the device to tell it it's clean.

fsck -ofull /dev/root

then try the mount.  

You could also try running divvy to see the layout of the disk and be sure the root slice is now named root.
Maybe try calling something else (maybe /dev/root is being used by the CD)  try calling it something unique like /dev/root1

mknod/dev/root1 b 1 42
fsck -ofull /dev/root1
mount /dev/root1 /mnt

Avatar of Rick

ASKER

I ran mknod /dev/root1 b 1 42

Then tried to run fsck -o full /dev/root1, but I get:

"/dev/roo1 is a mounted file system, ignoredCAN'T CHECK FILE SYSTEM."


Thanks,
Rick
Run just "mount"  it should show what is mounted.  It sounds like the filesystem is mounted under one name or another.  If it is the change to that dir and proceed.

If it is still no fly then reboot from the CD and start over using only a unique name like /dev/root1

Avatar of Rick

ASKER

When I run just "mount", all I get is a description of mount:

usage: mount [-m] [-r] [-f fstyp] special directory [mttab-special mttab-directory]

I'm rebooting the server now....

Thanks,
Rick
Maybe a "df" command would work to show you what's mounted.  some of the commands are not in the path when you are booted that way so you may need to know where "df" is in order to run it.  It sounds like it may have actually mounted with one of your attempts though.
Avatar of Rick

ASKER

Update:

Rebooted the server

Ran mknod/dev/root1 b 1 42

Ran fsck -ofull /dev/root1

It is now in Phase 1 - Checking Blocks and Sizes


Thanks,
Rick
Awesome!

Next is:

mount /dev/root1 /mnt
cd /mnt
chroot .
ttyupd
/tcb/bin/ale /etc/auth/system/ttys pttyupd


I did see one post out there that someone just deleted the /mnt/etc/auth/system/ttys file and let it get rebuilt on reboot (skipping the chroot and all the rest), but I think the above would be the preferred method.

Mike





Avatar of Rick

ASKER

How do I get the path to chroot?
How do I run this line after I get the correct path?

Thanks,
Rick
try:
cd /mnt
/mnt/etc/chroot .          (that's a period)
/tcb/bin/ttyupd
/tcb/bin/ale /etc/auth/system/ttys pttyupd
That's assuming you did the mount already.
Avatar of Rick

ASKER

I'm typing:

cd /mnt
/mnt/etc/chroot .


... but I'm getting:

/mnt/etc/chroot
not found


Thank you,
Rick


On my live system it's in /etc as a link to:
/opt/K/SCO/Unix/5.0.7Hw/etc/chroot

Yours would be 5.0.6Hw though.  It should also be on the CD somewhere.  Maybe /etc/chroot or just plain chroot with no path as it may already be there.
Try doing "ls" in the /mnt dir to see if you see anything.  If "ls" won't work then do "echo *"

Avatar of Rick

ASKER

When I type: /etc/chroot . or just chroot .

I get just a description of chroot:

usage: chroot newroot command

How can I search for chroot?


Thanks,
Rick
Then you found it.  Try:

chroot ./

or even:

chroot /mnt
Might need the command part:

chroot /mnt /bin/sh
Avatar of Rick

ASKER

This is what I got so far:

mknod/dev/root1 b 1 42

fsck -ofull /dev/root1

cd /mnt

chroot /mnt /bin/sh

/tcb/bin/ttyupd

When I ran the above line, I got: "System Defaults database could not be allocated due to: cannot be read"


Thank you,
Rick

I don't see that you did the mount.

Try now:
exit or CTRL-D   to break out of the shell you are now in.
cd /
mount /dev/root1 /mnt
chroot /mnt /bin/sh
/tcb/bin/ttyupd
/tcb/bin/ale /etc/auth/system/ttys pttyupd
Avatar of Rick

ASKER

I got: "/dev/root1 is already mounted, /mnt is busy, or allowable number of mount points exceeded: Device busy (error 16)"


Thank you,
Rick
OK - so it's mounted.  Try an "ls" to list the files, "df" to see the mounts.  Make sure you are not running the chroot anymore and then change to /mnt and do the "ls" to see the files on the drive.  Let me know if you see anything and if so is tcb there.

Mike
Avatar of Rick

ASKER

When I run ls here I see a lot of files... is there anything in particular I'm looking for?

If I do a cd /mnt
Then run ls, I see only:

floppy
Either you are still chroot'ed to /mnt or the root filesystem is not mounted to /mnt.  try the "df -k" command to see what's mounted and how big it is.  You may be able to run "dfspace" as well but I'm not sure if it's available in that mode.  If you don't see the /dev/root1 mounted somewhere then try to mount it again since you are not in the /mnt dir anymore the "mount /dev/root1 /mnt" should work if it is not mounted.  

If all this fails you may want to boot again to the shell and do:
mknod/dev/root1 b 1 42
mount /dev/root1 /mnt
cd /mnt
ls

see if you see files there - you should see all of the files from your root filesystem on the HD.  if you do then:
cd /mnt/etc/auth/system
mv ttys ttys.old
cd /
umount /mnt
reboot


Avatar of Rick

ASKER

After I run mv ttys ttys.old, I get: "mv: cannot access ttys: No such file or directory (error 2)"
Avatar of Rick

ASKER

When I run a ls inside /mnt/etc/auth/system, all I get is:

system
what does "ls" show?  I have these files:

authorize   devassign   gr_id_map   ttys
default     files       pw_id_map

Use "pwd" to be sure you are in /mnt/etc/auth/system



Maybe use "ls -al" to see what system is, a file or a dir.

Avatar of Rick

ASKER

A pwd shows me: /sysFS/system


I couldn't get to "system" directly as you showed me (cd /mnt/etc/auth/system)

So I did:

cd /mnt

ls

Saw all files from root filesystem

cd etc/auth

When I do a ls here, I get:

dlvr_audit
subsystems
system

cd /system






and "ls -al" from there gives?


Avatar of Rick

ASKER

A "ls -al" gives me:

drwxrwxrwx     2   2          2          512 Jul 28 11:50 .
drwxrwxrwx     5   3          1          512 Jul 28 11:50 ..
-rwxrwxrwx      1   2           2         10612 Jul 28 11:50 system
that last command you typed should have been "sd system"  not "cd /system"  Maybe it was, I know you can't copy and paste from the console, so...

cd not sd
Avatar of Rick

ASKER

That's what I did to get to "system":

cd /mnt
cd etc/auth
cd /system


If I do:

cd /mnt
cd etc/auth
sd system

I get sd: not found.
Avatar of Rick

ASKER

If I do cd system (without the forward slash), I get, "system: doesn not exist"
Your last cd (cd /system) is wrong - it can't have the slash (that brings you back down to root and then into system)
Avatar of Rick

ASKER

Well, if I type it without the slash, I get "system: does not exist"
Avatar of Rick

ASKER

If I do cd etc/auth/system, I get "etc/auth/system: does not exist"
I do notice on my live system that /etc/auth/system is a link to /var/opt/K/SCO/Unix/5.0.6Ga/etc/auth/system

Maybe the link is broken?

try to work you way down the /mnt/var/opt/K/SCO/Unix/5.0.6Ga/etc/auth/system path  start with cd / to get back to the bottom and cd them one at a time.
I there any way you can be sure this is actually your root FS that is mounted?  mabey "cat /mnt/etc/passwd" to see if your users are in there? Or "cat /mnt/etc/hosts" to see if your IP's are there?  I just want to be sure we are playing in the right sandbox.
Avatar of Rick

ASKER

OK. I'm here... a ls gives me:

authorize
default
devassign
files
gr_id_map
pw_id_map
ttys

Now what?
Sounds like the problem is that the link is broken.  I think we need to do the chroot thing to fix it, so:
cd /mnt/var/opt/K/SCO/Unix/5.0.6Ga/etc/auth/system
#####CREATE A FILE TO LOOK FOR IN A MIN.
echo test > test.txt
cd /
chroot /mnt /bin/sh
cd /var/opt/K/SCO/Unix/5.0.6Ga/etc/auth/system
ls -al       ######see that test.txt is there
######MAKE THE LINK
ln -s /var/opt/K/SCO/Unix/5.0.6Ga/etc/auth/system /etc/auth/system
ln -s /var/opt/K/SCO/Unix/5.0.6Ga/etc/auth/subsystems /etc/auth/subsystems


That will get the two important ones back and maybe the system will boot and at least let you in, maybe...

I think we will need to run some system verification afer that though - fixmog fixperms...  If you can get in after this and get into scoadmin there is a nice way to do it.  

I'm not sure if we want to "mv ttys ttys.old" at this point - the link is broken but we don't know when it happened.  It may have happened during one of the may fsck's after the problem cropped up,  from some of this thread I get the feeling that there may be other broken links that would prevent the generation of the ttys file.  Maybe just make the links for now then reboot and see if we can get you to single user mode to verify the OS install.
Avatar of Rick

ASKER

I ran those commands... the server is rebooting now...
Avatar of Rick

ASKER

Rebooted the server. When it comes up it stops on:
 
 INIT: SINGLE USER MODE
 
 sulogin: resource: System Defaults database could not be allocated due to: cannot be read
 
 Security Databases are corrupt.
 
 Starting root shell on console to allow repairs.
 
 Entering System Maintenance Mode
 
 logname: could not find entry in /etc/utmp
 
 TERM = (vt320) _
 
 
 
Close enough.

Term type at the console is "scoansi"

Avatar of Rick

ASKER

Now what?
Then try "scoadmin software"  tab to get down to the software and use space to select enterprise system.  Tab back to the top, go to Software then verify.  Then we get to choose - I'd go with broken/missing sym links first and run it.  Let it fix that and then go with a "quick state".  

My only apprehension would be any needed mods that your software has - like the perms on some file or another...   This process shouldn't break anything, it just puts the OS back to the default permissions and links and what-not.
It will examine first and let you choose if you want to fix anything at the end, so it's safe to run and you can always bail out before making any changes.
Avatar of Rick

ASKER

I can't login yet.

What do I do at the prompt: TERM = (vt320) _
type scoansi and hit ENTER

Hope you can follow the scoadmin stuff above - it's not hard but the interface is awful - TAB move from top to bottom, arrows to move to selections, space to tag selections and Enter to actually run the commands.  It's the worst.
Avatar of Rick

ASKER

Is broken/missing sym links on Enterprise the only thing I need to do for now?
Avatar of Rick

ASKER

... and quick state?
I think.  Most likely would want to let those two fix things, then run a thorough and see what it finds - might be nothing, or at least nothing important.

Are you able to even get to any of it yet?
Avatar of Rick

ASKER

I ran broken/missing sym links and quick state on Enterprise and let it fix the discrepancies.
After that I exited out of scoansi...

Then for each of my users, this message popped up: "System Defaults database could not be allocated due to: cannot be read. There are error for this user. Fix them (y/n)?

So I hit y + enter for all of them.

Now it says:

The system is coming up. Please wait.
yfsstat: /dev/boot mounted
Mounted /stand filesystem
%disk - - - type=S ha=1 id=0 lun=0 bus=0 ht=clad
%Sdsk - - - cyls=8716 hds=255 secs=32 fts=stdb
fsstat: /dev/u needs checking
mount: possibly damaged file system, mount failed: No space left of device (error 28)

/dev/u
HTFS File System: u Volume: u

** Phase 1 - Check Blocks and Sizes
Avatar of Rick

ASKER

Can I contact you via phone or email sometime tomorrow?
I'd better be going home soon, this is driving me nuts.
I'd be willing to pay you to help me bring this back up.
My email is rick.gwu@gmail.com

There's your problem(?).  You ran out of room and the system crashed because of it(?)  

Let me know the results of the /dev/u fsck - that's the stuff you really want.  If it comes up clean, hopefully not loosing anything important (it will most likely lose something) then some space will need to be freed up.  We may need to delve into what application you are running.

This explains the last error:
http://wdb1.sco.com/kb/showta?taid=125593
That would run amiss of the rules here.  I'd be happy to help some more once you sleep though.
ASKER CERTIFIED SOLUTION
Avatar of mikelfritz
mikelfritz
Flag of United States of America image

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

ASKER

That worked!
Thank you for your help,

Rick