1

We have an SELinux client that authenticates network users using LDAP connecting to an Active Directory server. Since our machines have to operate "untethered," we have to use nscd to cache group and passwd info.

Here's the issue. If we change group information on the Active Directory server, then log in on the client, if a cache exists for that user, LDAP seems to ignore the server and only use the cached data. The only way we've been able to get an update is to invalidate the passwd cache.

Significant portion of /etc/nsswitch.conf:

    passwd: file ldap cache
    group:  file ldap cache
    shadow: file ldap cache

Thanks.

Update: Figured out running strace getent passwd that nscd cache gets checked before /etc/nsswitch.conf gets read, so the configuration of nss doesn't matter.

Update 2: Playing with nss_updatedb today to see if it will work. So far no joy, although this howto looks like exactly what we need to do.

4

3 に答える 3

1

Active Directory からの結果をキャッシュしたくない場合は、nscd をオフにするか、キャッシュの有効期間を数分に設定する必要があります (/etc/nscd.conf を編集します)。デフォルトの存続時間は、passwd の場合は 10 分、group の場合は 1 時間だと思います。

于 2009-01-12T23:58:24.363 に答える
1

次のコマンドを使用して、nscd キャッシュを簡単にフラッシュできます。

sudo nscd -i passwd
sudo nscd -i group

特定のコマンドで nscd キャッシュをフラッシュすると、変更された LDAP データが表示されます。

詳細については、http ://sysadmin-notepad.blogspot.rs/2013/05/how-to-flush-nscd-cache-in-linux.html を参照してください。

于 2015-12-10T12:34:47.067 に答える