ssh works only as root

Ben Taylor bent at clark.net
Tue Mar 14 07:17:34 EST 2000


On Mon, 13 Mar 2000, Mate Wierdl wrote:

> On my solaris 2.6 box, I get 
> 
> ssh moni
> ld.so.1: ssh: fatal: libz.so: open failed: No such file or directory
> Killed

what happens when you export your LD_LIBRARY_PATH?  Is it the same
as the one below?

> while as root, I have no problem.  Note that 
> 
> echo $LD_LIBRARY_PATH
> /space/local/lib:/usr/local/lib:/usr/openwin/lib:/usr/lib:/opt/x11r5/lib

To avoid LD_LIBRARY_PATH on Solaris, I always build my executables with
LD_RUN_PATH=<dirlist> and -R<sparce/local/lib> (in your case).

If for whatever reason you end up putting libraries elsewhere, then you
can use LD_LIBRARY_PATH to maek the binary work.

> ls -l /space/local/lib/libz.*
> -rwxr-xr-x   1 wierdlm  faculty    70488 Mar 10 17:26 /space/local/lib/libz.a
> -rwxr-xr-x   1 bin      bin        85600 Mar 10 17:26 /space/local/lib/libz.so
> -rwxr-xr-x   1 bin      bin        85600 Mar 10 17:26 /space/local/lib/libz.so.1
> -rwxr-xr-x   1 bin      bin        85600 Mar 10 17:26 /space/local/lib/libz.so.1.1.3
> 
> Also, when I run ssh as root as
> 
> truss -e -o truss.out ssh moni
> 
> I get 
> 
> grep libz truss.out           
> open("/space/local/lib/libz.so", O_RDONLY)      = 4
> 
> I do not know how to trace ssh when as nonroot though.  I get
> 
> truss -e -o truss.out ssh moni
> ld.so.1: ssh: fatal: libz.so: open failed: No such file or directory
> truss: cannot trace set-id or unreadable object file: /space/local/bin/ssh


> Any ideas?

Add "env LDFLAGS='-R/space/local/lib'" to your configure line.

I just built openssl-0.9.5 and openssh-1.2.2 and everything worked.
(Solaris 7, x86, gcc-2.95.2)

Ben






More information about the openssh-unix-dev mailing list