Forum: CFEngine Help
Subject: Re: userexists in combination with ldap (AD)
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,23355,23358#msg-23358

tuibelgium Wrote:
-------------------------------------------------------
> Does the function "userexists" checks users in AD
> with LDAP?

The userexists function uses either the return of getpwuid() or getpwnam() 
(depending on whether the argument is a string or number) to determine if a 
user exists on the system.  Those calls will use whatever database is 
configured in the system's user lookup mechanism - LAM on AIX or NSS on pretty 
much every other less messed-up Unix variant. :)  So, if your system is 
configured to support AD-based users, the function should see them.

If you just want to check local /etc/passwd, you'll need to use something like 
the countlinesmatching or readstringarray functions to directly read lines from 
/etc/passwd.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to