RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1666307 - sssctl config-check giving the wrong error message when there are only snippet files and no sssd. conf
Summary: sssctl config-check giving the wrong error message when there are only snippe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Tomas Halman
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
: 1720554 (view as bug list)
Depends On: 1682305
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-15 13:26 UTC by Madhuri
Modified: 2023-02-12 23:51 UTC (History)
10 users (show)

Fixed In Version: sssd-2.2.3-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:55:59 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 4918 0 None None None 2020-05-02 19:06:08 UTC
Red Hat Issue Tracker RHELPLAN-14936 0 None None None 2023-02-12 23:51:10 UTC
Red Hat Issue Tracker SSSD-1752 0 None None None 2023-02-12 23:51:46 UTC
Red Hat Product Errata RHBA-2020:1863 0 None None None 2020-04-28 16:56:22 UTC

Description Madhuri 2019-01-15 13:26:02 UTC
Description of problem:
sssctl config-check giving the wrong error message when there are only snippet files and no sssd. conf

Version-Release number of selected component (if applicable):
sssd-2.0.0-38.el8.x86_64

How reproducible:
Always 

Steps to Reproduce:
1. Create snippet file under /etc/sssd/conf.d
2. change the ownership and permissions to root:root and 600
3. Start the sssd service 
4. Check user lookup
5. Run # sssctl config-check

Actual results:
# sssctl config-check
File /etc/sssd/sssd.conf does not exist. SSSD will use default configuration with files provider.
File ownership and permissions check failed. Expected root:root and 0600.


Expected results:
Here snippet file is added with proper ownership and permission and sssd does not use the default configuration as files provider.

Additional info:

# ll /etc/sssd/conf.d/01.conf
-rw-------. 1 root root 381 Jan 15 08:15 /etc/sssd/conf.d/01.conf


# cat /etc/sssd/conf.d/01.conf 
[sssd]
config_file_version = 2
domains = LDAP
services = nss, pam

[domain/LDAP]
ldap_search_base = dc=example,dc=com
debug_level = 9
id_provider = ldap
auth_provider = ldap
ldap_user_home_directory = /home/%u
ldap_uri = ldaps://server.example.com:636
ldap_tls_cacert = /etc/openldap/certs/cacert.pem
use_fully_qualified_names = True

[nss]

[pam]

# getent passwd testuser@LDAP
testuser@LDAP:*:14583101:14564100:testuser User::/bin/bash

Comment 1 Michal Zidek 2019-01-15 13:53:52 UTC
Just a note. This issue is about bad debug message.

# sssctl config-check
File /etc/sssd/sssd.conf does not exist. SSSD will use default configuration with files provider.
File ownership and permissions check failed. Expected root:root and 0600.


It should not say that the files domain will be used, because it may be not be (if snippets override it and create a different domain). Also the ownership and permissions check is confusing in this case and the message should probably not be printed at all.

Michal

Comment 2 Jakub Hrozek 2019-01-31 12:54:06 UTC
Upstream ticket:
https://pagure.io/SSSD/sssd/issue/3938

Comment 3 Michal Zidek 2019-06-14 08:19:57 UTC
*** Bug 1720554 has been marked as a duplicate of this bug. ***

Comment 4 Michal Zidek 2019-11-30 20:54:12 UTC
master:
* 414c1115492fcc8725bf41fbe1459ca1e1a3613f
* 587c8cb9d3a98e4d739645bf601447eb70126c65

Comment 6 Madhuri 2020-02-19 11:54:24 UTC
Verified with
# rpm -qa sssd sssd-tools
sssd-2.2.3-6.el8.x86_64
sssd-tools-2.2.3-6.el8.x86_64

Verification steps:
1. setup sssd with LDAP server
2. remove sssd.conf and add snippet file under /etc/sssd/conf.d/01.conf
with root:root ownership and 600 permission

[root@ci-vm-10-0-154-9 ~]# mv /etc/sssd/sssd.conf /etc/sssd/conf.d/01.conf
[root@ci-vm-10-0-154-9 ~]# cat /etc/sssd/conf.d/01.conf 
[sssd]
config_file_version = 2
services = nss, pam
domains = example1

[domain/example1]
ldap_search_base = dc=example,dc=test
id_provider = ldap
auth_provider = ldap
ldap_user_home_directory = /home/%u
ldap_uri = ldaps://ci-vm-10-0-154-191.hosted.upshift.rdu2.redhat.com
ldap_tls_cacert = /etc/openldap/cacerts/cacert.pem
use_fully_qualified_names = True
debug_level = 9

[root@ci-vm-10-0-154-9 ~]# chmod  600 /etc/sssd/conf.d/01.conf
[root@ci-vm-10-0-154-9 ~]# chown root:root /etc/sssd/conf.d/01.conf

3. restart sssd service
[root@ci-vm-10-0-154-9 ~]# systemctl stop sssd; rm -rf /var/lib/sss/db/*; systemctl start sssd

4. run # sssctl config-check

[root@ci-vm-10-0-154-9 ~]# sssctl config-check
File /etc/sssd/sssd.conf does not exist.
Issues identified by validators: 0

Messages generated during configuration merging: 0

Used configuration snippet files: 1
/etc/sssd/conf.d/01.conf


5. check lookup of user.
[root@ci-vm-10-0-154-9 ~]# getent passwd foo1@example1
foo1@example1:*:14583101:14564100:foo1 User::/bin/bash

The debug message is appropriate and
thus from above marking this bug as verified.

Comment 8 errata-xmlrpc 2020-04-28 16:55:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1863


Note You need to log in before you can comment on or make changes to this bug.