In places like the ntpd Upstart job we have code like this:

 if ! ${glibc}/bin/getent passwd ${ntpUser} > /dev/null; then
     ${pwdutils}/sbin/useradd -g nogroup -d ${stateDir} -s /noshell \
         -c 'NTP daemon user' ${ntpUser}
 fi
 chown ${ntpUser} ${stateDir}

However, this seems to fail when chown is running, because chown will consult nscd which believes that ${ntpUser} doesn’t exist, since it just determined so. However, ${ntpUser} has been created in the meantime by useradd. The nscd daemon should be informed of this. (Or alternatively, it shouldn’t do negative caching of passwd.)

Submitted on 22 January 2007 at 23:47

Log in to post comments