[torqueusers] Torque : pbs_mom stuck with "no password entry for user <someuser>" message

Henri Marsalet henri.marsalet at yahoo.fr
Mon Dec 6 13:34:45 MST 2010


Hi Ken,

Ken Nielson <knielson <at> adaptivecomputing.com> writes:

> Henri,
> 
> It appears you have already looked at the code. The problem is the 
> getpwnam has returned NULL for the user given. Can you give us the user 
> name that is failing?

I took a look in the code indeed. Actually I even made a little change to get
more information from the getpwnam() function.

if (pwdp == NULL)
        {
        /* FAILURE */

        sprintf(log_buffer, "no password entry for user %s, errno=%d (%s)", ptr,
errno, strerror(errno));

        return(NULL);
        }

So now I get this error in the syslog :

node32 pbs_mom: LOG_ERROR::start_exec, no password entry for user martin,
errno=2 (No such file or directory)

Moreover, I've made a little test program to see the behavior of the getpwnam()
function outside the Torque system :

node32$ cat testpasswd.c
#include <pwd.h>
#include <stdio.h>
#include <errno.h>

int main (void)
{
        char *user="martin";
        struct passwd *pwd;

        pwd = getpwnam(user);

        if (pwd == NULL) {
                printf("Password for %s failed. Error : %s\n", user,
strerror(errno));
                return 1;
        }
        else {
                printf("Get password for user %s OK. UID : %d\n", user,
pwd->pw_uid);
                return 2;
        }

        return 0;
}

By running this program on the same node with the same username, I could expect
to get the very same error. But look :

node32$ ./testpasswd
Get password for user martin OK. UID : 15061

And like I said, there is no authentication issue on any node, for instance :

node32$ getent passwd martin
martin:x:15061:1098:Lionel Martin:/homes/martin:/bin/nologinsh

node32$ id martin
uid=15061(martin) gid=1098(corpusers) groups=1098(corpusers)

Strange, isn'it ? 

Henri



More information about the torqueusers mailing list