Operating System - HP-UX
1834604 Members
4049 Online
110069 Solutions
New Discussion

help: i made a really dumb mistake..

 
SOLVED
Go to solution
Edwin R. Rivera_1
Occasional Advisor

help: i made a really dumb mistake..

i was moving/symlinking ksh around on a new a400 HP-UX v11.0 box i got in today so its location would match up with the entry in the NIS passwd map, and sure enough, i rm'ed the binary.

i know, i know, terrible... problem is, since this box is literally "just out of the box", i haven't had a chance to dump the filesystems to a tape yet.. so i can't restore the binary.

what's the EASIEST way to get a copy of that binary? is it on a CD somewhere ? i checked kornshell.com but the process looks a bit involved and i don't want to install a bunch of unnecssary stuff on a brand new production box.

thanks in advance for any help you can provide.

regards,

edwin "sloppy fingers" rivera
8 REPLIES 8
Timothy Czarnik
Esteemed Contributor

Re: help: i made a really dumb mistake..

Edwin,

Welcome to the "Fat Fingers" club, of which I'm guessing everyone on these forums is a member.

I was wondering if it wouldn't be as easy as downloading the latest ksh patch from HP's site and installing it.

Before you log out, verify that at least your root account isn't looking to use ksh as its primary shell, otherwise you won't be able to log back in without rebooting and editing the /etc/passwd file.

-Tim
Hey! Who turned out the lights!
Edwin R. Rivera_1
Occasional Advisor

Re: help: i made a really dumb mistake..

i tried copying the binary from an a180c (32 bit) HP-UX v11.0 to my a400 (64 bit) HP-UX v11.0 and it worked fine.

i'm just posting this for fyi purposes for those interested in the thread.

-edwin
Timothy Czarnik
Esteemed Contributor

Re: help: i made a really dumb mistake..

linuxfan
Honored Contributor

Re: help: i made a really dumb mistake..

Hi Edwin,


See if you have a file called /usr/bin/rksh
you can copy this file to ksh,
cp /usr/bin/rksh /usr/bin/ksh
chown bin:bin /usr/bin/ksh

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Edwin R. Rivera_1
Occasional Advisor

Re: help: i made a really dumb mistake..

thanks ramesh,

i was playing with that before, but it gave me warnings about being a "restricted" korn shell. i'll have to read up that one...
linuxfan
Honored Contributor

Re: help: i made a really dumb mistake..

Hi Edwin,


i know rksh is restricted ksh, but if you look at the inode numbers it is the same executable and depending on how is is invoked the restrictions come into effect.

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
linuxfan
Honored Contributor

Re: help: i made a really dumb mistake..

Hi Edwin,

Rather than cp, creating a hard link may be a better idea (that's how the original files are, on any other system do a "ls -ail /usr/bin/*ksh" )

ln /usr/bin/rksh /usr/bin/ksh

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Sridhar Bhaskarla
Honored Contributor
Solution

Re: help: i made a really dumb mistake..

If you have the installation CD you can copy this binary from OS-Core/UX-CORE/usr/bin
directory.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try