Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2119726

Summary: sssctl analyze --logdir option requires sssd to be configured
Product: Red Hat Enterprise Linux 8 Reporter: Alexey Tikhonov <atikhono>
Component: sssdAssignee: jstephen
Status: CLOSED ERRATA QA Contact: Steeve Goveas <sgoveas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.7CC: aboscatt, pbrezina, sgoveas
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.7.3-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 10:51:34 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:
Deadline: 2022-08-22   

Description Alexey Tikhonov 2022-08-19 10:02:47 UTC
This bug was initially created as a copy of Bug #2119373

I am copying this bug because: to track fix for RHEL8



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-19 10:19:47 UTC
Upstream PR: https://github.com/SSSD/sssd/pull/6304

Comment 2 Alexey Tikhonov 2022-08-22 10:47:47 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:23:52 UTC
RHEL 8.7 - sssd is running by default

No conf file
[root@ci-vm-10-0-138-203 ~]# ls /etc/sssd
conf.d  pki

[root@ci-vm-10-0-138-203 ~]# systemctl status sssd
● sssd.service - System Security Services Daemon
   Loaded: loaded (/usr/lib/systemd/system/sssd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-08-25 04:22:21 EDT; 4min 21s ago
 Main PID: 687 (sssd)
    Tasks: 3 (limit: 11344)
   Memory: 46.2M
   CGroup: /system.slice/sssd.service
           ├─687 /usr/sbin/sssd -i --logger=files
           ├─715 /usr/libexec/sssd/sssd_be --domain implicit_files --uid 0 --gid 0 --logger=files
           └─721 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files

Aug 25 04:22:20 localhost.localdomain systemd[1]: Starting System Security Services Daemon...
Aug 25 04:22:20 localhost.localdomain sssd[687]: Starting up
Aug 25 04:22:20 localhost.localdomain sssd_be[715]: Starting up
Aug 25 04:22:21 localhost.localdomain sssd_nss[721]: Starting up
Aug 25 04:22:21 localhost.localdomain systemd[1]: Started System Security Services Daemon.

[root@ci-vm-10-0-138-203 ~]# systemctl stop sssd

[root@ci-vm-10-0-138-203 ~]# systemctl status sssd
● sssd.service - System Security Services Daemon
   Loaded: loaded (/usr/lib/systemd/system/sssd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 2022-08-25 04:26:55 EDT; 8s ago
  Process: 687 ExecStart=/usr/sbin/sssd -i ${DEBUG_LOGGER} (code=exited, status=0/SUCCESS)
 Main PID: 687 (code=exited, status=0/SUCCESS)

Aug 25 04:22:20 localhost.localdomain systemd[1]: Starting System Security Services Daemon...
Aug 25 04:22:20 localhost.localdomain sssd[687]: Starting up
Aug 25 04:22:20 localhost.localdomain sssd_be[715]: Starting up
Aug 25 04:22:21 localhost.localdomain sssd_nss[721]: Starting up
Aug 25 04:22:21 localhost.localdomain systemd[1]: Started System Security Services Daemon.
Aug 25 04:26:55 ci-vm-10-0-138-203.hosted.upshift.rdu2.redhat.com systemd[1]: Stopping System Security Services Daemon...
Aug 25 04:26:55 ci-vm-10-0-138-203.hosted.upshift.rdu2.redhat.com systemd[1]: sssd.service: Succeeded.
Aug 25 04:26:55 ci-vm-10-0-138-203.hosted.upshift.rdu2.redhat.com systemd[1]: Stopped System Security Services Daemon.


[root@ci-vm-10-0-138-203 ~]# rpm -q sssd-tools
sssd-tools-2.7.3-2.el8.x86_64

[root@ci-vm-10-0-138-203 ~]# 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

Add latest sssd repo
[root@ci-vm-10-0-138-203 ~]# yum update sssd-tools --nogpgcheck -yq

[root@ci-vm-10-0-138-203 ~]# rpm -q sssd-tools
sssd-tools-2.7.3-3.el8.x86_64

RHEL 8.7 sssd logs
[root@ci-vm-10-0-138-203 ~]# 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

RHEL 9.1 sssd logs
[root@ci-vm-10-0-138-203 ~]# 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

Comment 9 errata-xmlrpc 2022-11-08 10:51:34 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:7739