Jump to content
Excelsior Forums
ahadaller

Using Excelsior JET on Linux with LDAP

Recommended Posts

When I try to run JET on a linux machine where the user authenticates through LDAP I get the following message:

Unable to get user info (uid = XXXX): -143736914

If I try to run JET with a local user account on the same machine, everything works correctly.

This happens both when trying to start the control panel, or when trying to run an application compiled with JET.

I am running CentOS release 6.3 (Final) and using JET v7.6 STD edition.

Please help

Share this post


Link to post
Share on other sites

This happens both when trying to start the control panel, or when trying to run an application compiled with JET.

Does the problem appear when you run your application on Oracle JRE?

Share this post


Link to post
Share on other sites

Please try to install MP5 available at http://www.excelsior-usa.com/jetdl760mp5.html

User name and password are the same as for the main package.

I installed the "Maintenance Pack 5 only" and the message is now slightly different, but it still does not work

I now get:

Unable to get user info (uid = XXXX): Success

It still works properly as a local user on this box. I only get this error message when trying to run jetcp, or an application compiled with JET when I am a user that authenticates through LDAP (i.e. not a local user)

However, jetsetup runs and produces output as the ldap user.

The following profiles were found by JET Setup:

0: profile1.6.0_27

Profile status: Ready

Java SE: 1.6.0_27

Share this post


Link to post
Share on other sites

I now get:

Unable to get user info (uid = XXXX): Success

Probably your local LDAP configuration is not complete.

Could you please show your "/etc/nsswitch.conf" file contents?

Share this post


Link to post
Share on other sites

Probably your local LDAP configuration is not complete.

Could you please show your "/etc/nsswitch.conf" file contents?

the contents of my nsswitch.conf is:

passwd: files ldap

shadow: files ldap

group: files ldap

hosts: files dns

bootparams: nisplus [NOTFOUND=return] files

ethers: files

netmasks: files

networks: files

protocols: files

rpc: files

services: files

netgroup: files ldap

publickey: nisplus

automount: files ldap

aliases: files nisplus

Share this post


Link to post
Share on other sites

passwd: files ldap

It looks correctly.

Please run the following command in your terminal:

getent passwd $(id -u)

Does it output user info correctly, or silently exits?

Also, if you can compile a C program, could you please build and run the following test:

#include <stdio.h>
#include <pwd.h>
#include <unistd.h>
#include <errno.h>

int main() {
       struct passwd * pw = getpwuid(getuid());

       if(pw == NULL) {
               printf("No user info found; errno=%d\n", errno);
       } else {
               printf("name\t%s\nuid\t%d\nhome\t%s\n", pw->pw_name, pw->pw_uid, pw->pw_dir);
       }

       return 0;
}

Does it output your user info? If it does not, what message does it show?

Share this post


Link to post
Share on other sites

It looks correctly.

Please run the following command in your terminal:

getent passwd $(id -u)

Does it output user info correctly, or silently exits?

This runs correctly and gives me my correct user name, uid, full name, home directory, etc.

Also, if you can compile a C program, could you please build and run the following test:

#include <stdio.h>
#include <pwd.h>
#include <unistd.h>
#include <errno.h>

int main() {
       struct passwd * pw = getpwuid(getuid());

       if(pw == NULL) {
               printf("No user info found; errno=%d\n", errno);
       } else {
               printf("name\t%s\nuid\t%d\nhome\t%s\n", pw->pw_name, pw->pw_uid, pw->pw_dir);
       }

       return 0;
}

Does it output your user info? If it does not, what message does it show?

Same with this, I get the correct user name, uid, and home directory

Share this post


Link to post
Share on other sites

Do you use 64-bit CentOS?

This may cause the problem, since JET is 32-bit.

If your CentOS is 32-bit, the following is irrelative.

Do you have 32-bit version of libnss_ldap.so.2 library in your system?

It should be found at /lib or /lib32

To ensure it is 32-bit, you may check it with "file -L":

$ file -L /lib/libnss_ldap.so.2 
/lib/libnss_ldap.so.2: ELF 32-bit ...

Also, to check if a 32-bit program on your system may correctly get passwd info from LDAP directory,

please compile the test program from my previos post in 32-bit mode and run it.

If you do not have a 32-bit Linux machine to easily compile the program, you may use the following command:

gcc -m32 test.c

(Probably it requires to install additional packages with 32-bit development files).

Share this post


Link to post
Share on other sites

Do you use 64-bit CentOS?

This may cause the problem, since JET is 32-bit.

If your CentOS is 32-bit, the following is irrelative.

Yes, it is a 64 bit version of CentOS

Do you have 32-bit version of libnss_ldap.so.2 library in your system?

It should be found at /lib or /lib32

To ensure it is 32-bit, you may check it with "file -L":

$ file -L /lib/libnss_ldap.so.2 
/lib/libnss_ldap.so.2: ELF 32-bit ...

I only had the 64 bit version of this library installed. I installed the 32 bit version and it is working now!

Also, to check if a 32-bit program on your system may correctly get passwd info from LDAP directory,

please compile the test program from my previos post in 32-bit mode and run it.

If you do not have a 32-bit Linux machine to easily compile the program, you may use the following command:

gcc -m32 test.c

(Probably it requires to install additional packages with 32-bit development files).

I had compiled this program on a 32 bit machine and it still worked correctly on the 64 bit machine.

However, installing the 32bit version of libnss_ldap.so.2 appears to have fixed it. I can now run jetcp, and a program compiled with JET on this box.

Thank you very much for the help!

Share this post


Link to post
Share on other sites

I want to add one more note about this issue: the same problems could be caused by absense of samba-winbind-modules.i686 library.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×