Mac OS X Server: Changes to a user record take a long time to sync

After changing a user record in Open Directory/LDAP server, the POSIX layer (lookupd) may not immediately pick up the changes.
Symptom

If you use "id <user>" to find a user record, subsequently change something in the user record (such as the GID which id displays), then use "id <user>" again, the change may not be seen.

Products affected

Solution

Execute the two commands below in Terminal. This will change the time to live for the records to 300 seconds, but you are free to substitute your preferred value.

$ sudo nicl . create /locations/lookupd TimeToLive 300
$ sudo killall -1 lookupd


Published Date: Oct 10, 2016