[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Problem with tilde expansion, Condor user, etc.



Condor uses getpwnam(3) to expand tilde. It could be a caching issue on the machines.

Some more information, such as condor_config_val -config and running getpwnam (below) on working and broken machines could be informative.

Also, do you have to reboot the machine or does restarting Condor alone fix the problem? Condor does some of its own caching. Does a condor_reconfig (or condor_reconfig -full) clear up the issue?

Best,


matt

--

$ cat getpwnam.c
#include <sys/types.h>
#include <pwd.h>
#include <stdio.h>

int
main(int argc, char **argv)
{
	if (argc < 2) {
		printf("%s [name]\n", argv[0]);
		return 1;
	}

	struct passwd *pwnam = getpwnam(argv[1]);
	if (!pwnam) {
		perror("getpwnam");
		return 2;
	}

	printf("pw_name: %s\n", pwnam->pw_name);
	printf("pw_passwd: %s\n", pwnam->pw_passwd);
	printf("pw_uid: %d\n", pwnam->pw_uid);
	printf("pw_gid: %d\n", pwnam->pw_gid);
	printf("pw_gecos: %s\n", pwnam->pw_gecos);
	printf("pw_dir: %s\n", pwnam->pw_dir);
	printf("pw_shell: %s\n", pwnam->pw_shell);

	return 0;
}

$ gcc -o getpwnam getpwnam.c

$ ./getpwnam condor
pw_name: condor
pw_passwd: x
pw_uid: 487
pw_gid: 471
pw_gecos: Owner of Condor Daemons
pw_dir: /var/lib/condor
pw_shell: /sbin/nologin


On 10/06/2011 07:24 AM, Angel de Vicente wrote:
Hi all,

a few years ago I posted the following message. At the time I didn't
find a solution, but rebooting a few machines was sufficient. This time
the same problem is showing up, but this time with a vengeance (an
increasing number of machines is being affected, and the problem appears
quite often: a user had to reboot the machines three times in two weeks
because of this), so I'm hoping I can solve it. Does anybody have any
suggestions/clues of what could be causing this behaviour?

Thanks,
Ángel de Vicente


I am having a problem starting Condor in one of our machines. The
setting is the same as in many other machines, Condor has been
previously running in this one, and if I reboot the machine, then all is
in order... (but rebooting is not an option now...)

Basically if I try to start Condor, I get:

[root@enigma ~]# /etc/init.d/condor start
Starting up Condor

Neither the environment variable CONDOR_CONFIG,
/etc/condor/, nor ~condor/ contain a condor_config source.
Either set CONDOR_CONFIG to point to a valid config source,
or put a "condor_config" file in /etc/condor or ~condor/
Exiting.

[root@enigma ~]#

But the configuration file is in there:

[root@enigma ~]# ls ~condor/condor_config
/home/condor/condor_config

I don't know what could be causing this behaviour. Any ideas/hints?

(If I solve this manually, by setting CONDOR_CONFIG, then starting
Condor complains about condor user not being in the passwd file, but
that should be like that, as all users are authenticated by LDAP...)

Thanks,
Ángel de Vicente