Prev: Internal CD drive?
Next: Scriptable method to determine if user is local (/etc/passwd)user or LDAP user on Sol10 server
From: CKM on 6 May 2010 13:07 Besides some grepping through /etc/passwd and assumptions of repository order in nsswitch.conf, is there any method to easily determine is a user is local vs LDAP? The ldaplist command is a pretty good start to tell me if a user is in LDAP, but it doesn't preclude a user being in /etc/passwd and depending on nsswitch.conf, either could take precedence.
From: CKM on 6 May 2010 21:51
Agreed, the lookup order is maintained, but it doesn't tell me if the user is local or not. It just means the getent passwd is consistent with the nsswitch.conf lookup order. On May 6, 4:12 pm, Ian Collins <ian-n...(a)hotmail.com> wrote: > On 05/ 7/10 05:07 AM, CKM wrote: > > > Besides some grepping through /etc/passwd and assumptions of > > repository order in nsswitch.conf, is there any method to easily > > determine is a user is local vs LDAP? > > > The ldaplist command is a pretty good start to tell me if a user is in > > LDAP, but it doesn't preclude a user being in /etc/passwd and > > depending on nsswitch.conf, either could take precedence. > > I'm pretty sure the order of the output of "getent passwd" reflects the > lookup order. > > -- > Ian Collins |