Bug 2119373

Summary: sssctl analyze --logdir option requires sssd to be configured
Product: Red Hat Enterprise Linux 9 Reporter: Alexey Tikhonov <atikhono>
Component: sssdAssignee: jstephen
Status: CLOSED ERRATA QA Contact: Steeve Goveas <sgoveas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: aboscatt, pbrezina, sgoveas
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.7.3-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 11:17:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexey Tikhonov 2022-08-18 13:27:05 UTC
The analyzer tool with --logdir option should be functional on a system where SSSD is not running, or configured. sssctl analyze codepath should circumvent sssd initialization and call the analyze python command.

Comment 1 Alexey Tikhonov 2022-08-18 13:59:17 UTC
Upstream PR: https://github.com/SSSD/sssd/pull/6304

Comment 2 Alexey Tikhonov 2022-08-22 10:48:00 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/6314 (backport PR)

* `sssd-2-7`
    * f8704cc24eafe190e6c78dc21535f6029d51d647 - SSSCTL: Allow analyzer to work without SSSD setup

Comment 3 Steeve Goveas 2022-08-25 09:16:49 UTC
[root@ci-vm-10-0-137-137 ~]# systemctl status sssd
○ sssd.service - System Security Services Daemon
     Loaded: loaded (/usr/lib/systemd/system/sssd.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
  Condition: start condition failed at Thu 2022-08-25 04:33:26 EDT; 1min 6s ago
             ├─ ConditionPathExists=|/etc/sssd/sssd.conf was not met
             └─ ConditionDirectoryNotEmpty=|/etc/sssd/conf.d was not met

Aug 25 04:33:26 localhost systemd[1]: System Security Services Daemon was skipped because all trigger condition checks failed.

[root@ci-vm-10-0-137-137 ~]# ls /etc/sssd/
conf.d  pki

[root@ci-vm-10-0-137-137 ~]# yum install sssd-tools -yq
Installed:
  python3-sss-2.7.3-2.el9.x86_64          python3-sssdconfig-2.7.3-2.el9.noarch          python3-systemd-234-18.el9.x86_64          sssd-dbus-2.7.3-2.el9.x86_64          sssd-tools-2.7.3-2.el9.x86_64 

[root@ci-vm-10-0-137-137 ~]# sssctl analyze --logdir tmp/sssd/ request list 
[sssd] [confdb_expand_app_domains] (0x0010): No domains configured, fatal error!
[sssd] [sss_tool_route] (0x0010): Command initialization failed [2] No such file or directory

Add repo for latest sssd

[root@ci-vm-10-0-137-137 ~]# yum update sssd-tools --nogpgcheck -yp
[root@ci-vm-10-0-137-137 ~]# rpm -q sssd-tools
sssd-tools-2.7.3-3.el9.x86_64

RHEL 9.1 logs
[root@ci-vm-10-0-137-137 ~]# sssctl analyze --logdir tmp/sssd/ request list 
2022-08-25  3:59:15: [uid 0] CID #1: id
2022-08-25  3:59:15: [uid 0] CID #2: sshd: foo1@example1

RHEL 8.7 logs
[root@ci-vm-10-0-137-137 ~]# sssctl analyze --logdir tmp8.7/sssd/ request list 
2022-08-25  4:12:47: [uid 0] CID #1: id
2022-08-25  4:12:48: [uid 0] CID #2: /sbin/auditd

Comment 9 errata-xmlrpc 2022-11-15 11:17:44 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 (sssd bug fix and enhancement update), 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-2022:8325