LDAP:change default values of GroupNameAttribute and UserNamAttribute
Modify UserNameAttribute default value to "cn" and
GroupNameAttribute default value to "gidNubmer"
create config already enabled to make these attributes
user configurable.these default values are to make sure ldap
config works if user does not configure these attributes.
Tested by:
Configured LDAP without specifying group name and user name
attributes and tested ldap user authentication
Change-Id: I0091389122a384e0966659161566e9e543608628
Signed-off-by: raviteja-b <raviteja28031990@gmail.com>
diff --git a/phosphor-ldap-config/ldap_configuration.cpp b/phosphor-ldap-config/ldap_configuration.cpp
index 4f2f85c..466b72d 100644
--- a/phosphor-ldap-config/ldap_configuration.cpp
+++ b/phosphor-ldap-config/ldap_configuration.cpp
@@ -151,11 +151,11 @@
{
if (ConfigIface::userNameAttribute().empty())
{
- ConfigIface::userNameAttribute("uid");
+ ConfigIface::userNameAttribute("cn");
}
if (ConfigIface::groupNameAttribute().empty())
{
- ConfigIface::groupNameAttribute("gid");
+ ConfigIface::groupNameAttribute("gidNumber");
}
confData << "filter passwd (objectclass=*)\n";
confData << "map passwd gecos displayName\n";