From c3f56c50ffffe1076531eb4aad7c0a574a44841f Mon Sep 17 00:00:00 2001 From: raviteja-b Date: Tue, 2 Apr 2019 11:09:04 -0500 Subject: 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 --- phosphor-ldap-config/ldap_configuration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phosphor-ldap-config/ldap_configuration.cpp') 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 @@ void Config::writeConfig() { 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"; -- cgit v1.2.1