Operating System - HP-UX
1748255 Members
4082 Online
108760 Solutions
New Discussion юеВ

/usr/lib/hpux32/dld.so file is renamed

 
SOLVED
Go to solution
Ramaprasad K
Regular Advisor

/usr/lib/hpux32/dld.so file is renamed

Hi experts,

'dld.so' library file has been renamed by one user to 'dld.so_save'. Following command is what she had run :
#pwd
/usr/lib/hpux32
#mv dld.so dls.so_save

Because of this blunder, no commands are running. Even from Single User mode. When any command is run, following is what the error is :

# ls

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# find

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# w

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# cd /usr/sbin

# vi

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# cd /usr/lib/hpux32

# /usr/bin/cp dld.so_safe dld.so

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

**********************************************

Need your guidance in resolving this at the earliest.

Regards,
Ramaprasad K
19 REPLIES 19
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>dld.so library file has been renamed by one user

You are confused. This was renamed by root. You need to talk to this person.
If you don't know about these tricks below, you should not fiddle with dld.so directly and only swinstall/swremove on linker patches. (Or mail/call me directly. :-)

If you are going to fiddle with dld.so, you need to use atomic ln(1) operations. And not mv or cp:
# ln -f dld.so dld.so_save
# ln -f dld.so.new dld

But you are in luck, you can repair it by a bigger hammer, even without going into single user mode:
# /sbin/ln -f dld.so_save dld.so
Dennis Handly
Acclaimed Contributor
Solution

Re: /usr/lib/hpux32/dld.so file is renamed

A slight typo: ... And not mv or cp:
# ln -f dld.so dld.so_save
# ln -f dld.so_new dld.so

You can use cp to put dld.so_new in place.
Ramaprasad K
Regular Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Thanks Dennis,

Sorry, 'User' I meant by person with root access.

Also, one more clarification. Does 'ln' run. As no commands are running as showm in my first post.

regards.
Ram
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>Does ln run?

No, not after the system was messed up. That's why you now need to use /sbin/ln.
Sagar Sirdesai
Trusted Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

Hi
You need to login from cdron in single user mode and then correct the changes .

Sagar
Venkatesh BL
Honored Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

Thank god for 'static' binaries! Luckily, you should be able to run commands that are in '/sbin' directory. There is a /sbin/mv as well!
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>Venkatesh: There is a /sbin/mv as well.

In order to keep it straight, you should only use atomic ln(1).
Barakati
Frequent Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Hi,

I am also facing same problem.
but i even do not have any root session open could you please tell me the exact steps i need to follow in order to fix it.

I really appreciate.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>dba_hp: I am also facing same problem.

Don't ever fiddle with system shlibs unless you have two root sessions and one user session for testing.

>tell me the exact steps i need to follow in order to fix it.

If you aren't logged on as root, you'll have to boot into single user mode and follow the steps in this other thread where they made an even more dangerous mistake:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1304918