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
LVL 13
RickAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omarfaridCommented:
can you login as root in single user mode?

have you encountered system crash?
0
RickAuthor Commented:
I don't know.... how do I login in single user mode?
0
omarfaridCommented:
I think when you boot the system the first thing is it shows you option to login to single user mode
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

RickAuthor Commented:
OK. I can't login in single user mode.
0
omarfaridCommented:
did your system encounter a crash recently?
0
mikelfritzCommented:
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
0
RickAuthor Commented:
It is giving me a:

mount: Bad Address


Thanks,
Rick
0
RickAuthor Commented:
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
0
RickAuthor Commented:
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

0
mikelfritzCommented:
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
0
RickAuthor Commented:
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






0
RickAuthor Commented:
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
0
mikelfritzCommented:
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.
0
mikelfritzCommented:
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

0
RickAuthor Commented:
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
0
mikelfritzCommented:
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

0
RickAuthor Commented:
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
0
mikelfritzCommented:
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.
0
RickAuthor Commented:
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
0
mikelfritzCommented:
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





0
RickAuthor Commented:
How do I get the path to chroot?
How do I run this line after I get the correct path?

Thanks,
Rick
0
mikelfritzCommented:
try:
cd /mnt
/mnt/etc/chroot .          (that's a period)
/tcb/bin/ttyupd
/tcb/bin/ale /etc/auth/system/ttys pttyupd
0
mikelfritzCommented:
That's assuming you did the mount already.
0
RickAuthor Commented:
I'm typing:

cd /mnt
/mnt/etc/chroot .


... but I'm getting:

/mnt/etc/chroot
not found


Thank you,
Rick


0
mikelfritzCommented:
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.
0
mikelfritzCommented:
Try doing "ls" in the /mnt dir to see if you see anything.  If "ls" won't work then do "echo *"

0
RickAuthor Commented:
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
0
mikelfritzCommented:
Then you found it.  Try:

chroot ./

0
mikelfritzCommented:
or even:

chroot /mnt
0
mikelfritzCommented:
Might need the command part:

chroot /mnt /bin/sh
0
RickAuthor Commented:
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

0
mikelfritzCommented:
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
0
RickAuthor Commented:
I got: "/dev/root1 is already mounted, /mnt is busy, or allowable number of mount points exceeded: Device busy (error 16)"


Thank you,
Rick
0
mikelfritzCommented:
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
0
RickAuthor Commented:
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
0
mikelfritzCommented:
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


0
RickAuthor Commented:
After I run mv ttys ttys.old, I get: "mv: cannot access ttys: No such file or directory (error 2)"
0
RickAuthor Commented:
When I run a ls inside /mnt/etc/auth/system, all I get is:

system
0
mikelfritzCommented:
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



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

0
RickAuthor Commented:
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






0
mikelfritzCommented:
and "ls -al" from there gives?


0
RickAuthor Commented:
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
0
mikelfritzCommented:
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...

0
mikelfritzCommented:
cd not sd
0
RickAuthor Commented:
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.
0
RickAuthor Commented:
If I do cd system (without the forward slash), I get, "system: doesn not exist"
0
mikelfritzCommented:
Your last cd (cd /system) is wrong - it can't have the slash (that brings you back down to root and then into system)
0
RickAuthor Commented:
Well, if I type it without the slash, I get "system: does not exist"
0
RickAuthor Commented:
If I do cd etc/auth/system, I get "etc/auth/system: does not exist"
0
mikelfritzCommented:
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.
0
mikelfritzCommented:
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.
0
RickAuthor Commented:
OK. I'm here... a ls gives me:

authorize
default
devassign
files
gr_id_map
pw_id_map
ttys

Now what?
0
mikelfritzCommented:
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.
0
RickAuthor Commented:
I ran those commands... the server is rebooting now...
0
RickAuthor Commented:
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) _
 
 
 
0
mikelfritzCommented:
Close enough.

Term type at the console is "scoansi"

0
RickAuthor Commented:
Now what?
0
mikelfritzCommented:
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.
0
mikelfritzCommented:
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.
0
RickAuthor Commented:
I can't login yet.

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

0
mikelfritzCommented:
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.
0
RickAuthor Commented:
Is broken/missing sym links on Enterprise the only thing I need to do for now?
0
RickAuthor Commented:
... and quick state?
0
mikelfritzCommented:
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?
0
RickAuthor Commented:
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
0
RickAuthor Commented:
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

0
mikelfritzCommented:
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
0
mikelfritzCommented:
That would run amiss of the rules here.  I'd be happy to help some more once you sleep though.
0
mikelfritzCommented:
If it's still not working after the boot you could boot back to the CD and mknod, mount, and then copy the tcb files from /mnt/opt/K/SCO/Unix/5.0.6Ga/.softmgmt/var/etc/auth/system to /mnt/etc/auth/system

That would put a default copy of all of the files into the /etc/auth/system dir on the disk.

You would still need to take care of the space issues that may have caused this though.  

I would then run the scoadmin software verification in thorough mode.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RickAuthor Commented:
That worked!
Thank you for your help,

Rick
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.