Re: Testing Linux Client
Posted in 2000
Thanks again for all you help. Unfortunately I have still not managed a
connection. Here is what I have tried so far.
1. I added s=0 as the fifth parameter in each sqlhosts entry. This did not
have any effect, I still recieved the same error "Client (%s) or user is not
trusted by the database server".
2. I executed the command GRANT dba to username, although i'm sure i did not
need to do this becuase I am using informix as my user and password. The
command executed correctly and said that permission was granted but
unfortunatley on reconnecting i recieved the same error.
3. I created a host.equiv file with a "+" in it and added it to
"winnt/system32/drivers/etc/" folder and I checked that I was able to ping
between both machines. When attempting connection I recieved a new error "-349
Database not selected". I checked to ensure that the database was running from
another client (win) and it connected successfully.
4. As suggested by Jonathon I executed "rsh <servername> ls" and an error
occured saying permission denied. According to my MIS guy, this is to be
expected becuase he has disabled rsh on the server. In repsonse to your
question, Jonathon, I am using shadow passwords with MD5 encryption. The server
versions are IDS2000 on Red Hat 6.2 and Dynamic Server 7.3 on NT. The CSDK is
v2.4 for Linux.
I added FQDN to the hostname parameters in sqlhosts but this too did not make
any difference.
5. I checked to see whether I had a .rhosts file on my Linux server in the
Informix home directory but it did not exist. I added one and entered the
client hostname to the file, but it did not make any difference. However I am
not sure the format of the .rhosts file was correct.
My connect.ec file connects using "$database :xName;" where xName is the
database name.When compliling this using esql the connect.c file has translated
the command to "sqli_db_open(xName, 0);". This connection does not take a
username and password as a parameter, so how does the server know my username
and password? On windows the username and password are set in the SETNET
facility, what is the linux equivalent for setting username and password?
Ian.
Jonathan Leffler wrote:
> On Wed, 27 Sep 2000, Ian Thurbon wrote:
> >Thanks Jonathan, Art and John for you help. I plan to port an existing
> >windows informix application to linux and before I start the port, I
> >wanted to ensure the client was correctly set-up.
>
> Wise; very wise.
>
> >I took your advice and quickly created an ESQL/C application that
> >connects to my server and hey presto! it failed. The errorcode is -956
> >- "Client (%s) or user is not trusted by the database server".
>
> Oh dear.
>
> Did you use the simple 'DATABASE statement' programs I showed? You
> could consider trying the alternative 'CONNECT statement' instead:
>
> EXEC SQL CONNECT TO 'remotedbs@server' AS 'myconn'
> USER 'username' USING 'password';
>
> It gives you more to edit which is why omitted it as an option first
> time around.
>
> >I have tried this against an NT server and a Linux server both with the
> >same error.
>
> That is, you tried connecting from your new Linux box to an alternative
> Linux server with a known-to-be-OK database server running on it, and
> also to an NT server with a known-to-be-OK database server running on
> it, and both connection attempts failed the same way. Is your Linux
> user able to do "rsh altlinux ls", where altlinux is the name of your
> alternative Linux server? Is that box running with MD5 passwords or
> shadow passwords? Both are known problem areas for early versions of
> Informix. Exactly which versions of the servers are you running on
> those remote machines? Exactly which version of CSDK are you using on
> your new machine?
>
> >These servers are working with my windows clients correctly. I checked
> >the Hosts.equiv file on the server and it contains "+ +", which i
> >understand means any client, any host.
>
> Assuming you are referring to /etc/hosts.equiv (lower case), you might
> want to review that! It may be safe enough to get you up and running,
> but in the medium term (let alone the long term and potential deployment
> of the system), you should not run a machine with that level of
> insecurity, not even within an intranet. Well, I wouldn't...
>
> >I have ensured that the INFORMIXSERVER variable contains the correct
> >name and also ensured that two correct entries are added to the
> >sqlhosts file on the client, one for each server. I have also added
> >the correct protocol and port number to the services file. Is there
> >anything I have missed or should check on the server or client that may
> >cause this problem?
>
> The hostname for the Linux server should be the FQDN (fully qualified
> domain name); whatever it is that "uname -n" says. [...but I just
> checked my RedHat 6.2 box which gives horus now, instead of
> horus.informix.com, but horus.informix.com seems to be OK in the
> sqlhosts file.
>
> >Jonathan Leffler wrote:
> >> On Tue, 26 Sep 2000, Ian Thurbon wrote:
> >> >I do not have dbaccess as part of my Client SDK.
> >>
> >> Oh bother, I always forget that egregious piece of mis-packaging.
> >> Sorry for misleading you.
> >>
> >> Art's answer covers the other alternatives.
> >>
> >> If you need to write ESQL/C and you have a pre-existing database on the
> >> remote server, you can use:
> >>
> >> int main()
> >> {
> >> EXEC SQL WHENEVER ERROR STOP;
> >> EXEC SQL DATABASE 'remotedbs';
> >> puts("OK");
> >> return(0);
> >> }
> >>
> >> If you don't have a pre-existing database on the remote server (which
> >> would be surprising), then you can use:
> >>
> >> int main()
> >> {
> >> EXEC SQL WHENEVER ERROR STOP;
> >> EXEC SQL CREATE DATABASE 'remotedbs';
> >> puts("OK");
> >> return(0);
> >> }
> >>
> >> You need to have INFORMIXSERVER set; you probably need INFORMIXDIR set;
> >> and you need $INFORMIXDIR/etc/sqlhosts (or $INFORMIXSQLHOSTS) to contain
> >> an entry for your INFORMIXSERVER.
> >>
> >> >I have dbaccess on the my server which I used to verify the server is
> >> >running correctly. I need to verify that my Linux client has been set
> >> >up correctly. I am unsure of how to do this.
> >> >
> >> >Regards
> >> >Ian Thurbon
> >> >
> >> >
> >> >Jonathan Leffler wrote:
> >> >> On Mon, 25 Sep 2000, Ian Thurbon wrote:
> >> >> >I have installed informix client SDK on Linux and have configured
> >> >> >my environment, sqlhosts, services files etc to point at my
> >> >> >server. How do I test to see whether this has been configured
> >> >> >correctly? On win32 I use iLogin demo which is sufficient, but
> >> >> >there does not seem to be a Linux equivalent. Any ideas would be
> >> >> >much appreciated.
> >> >>
> >> >> Simplest test is to run DB-Access and create a database:
> >> >>
> >> >> dbaccess - - <<!
> >> >> create database whatnot;> >> >> !
> >> >>