NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/krb5.cpython-36.pyc
3

~�g��@sbddlZddlZddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�Z	dS)	�N)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc@s0eZdZdZdZdZdZdZdd�Zd	d
�Z	dS)�Krb5a:This plugin handles the collection of kerberos authentication config
    files and logging. Users should expect to see their krb5 config(s) in the
    final archive, along with krb5 logging and `klist` output.

    kdc configs and acls will also be collected from the distribution-spcecific
    kdc directory.
    zKerberos authenticationZkrb5�identity�systemNcCs\|jdd|j�d�|j�d�dg�|j�|jddd�|jd	|j�d
��|jd�dS)Nz/etc/krb5.confz/etc/krb5.conf.d/*z
/kadm5.aclz	/kdc.confz/var/log/kadmind.logz/var/log/krb5kdc.logZkerberos_kdc_log)Ztagszklist -ket z/.k5*zklist -ket /etc/krb5.keytab)Z
add_copy_spec�kdcdir�
collect_kinit�add_cmd_output)�self�r
�/usr/lib/python3.6/krb5.py�setups

z
Krb5.setupcCs�tj�}d}|j|�r�t|ddd��v}xn|D]f}tjd|tj�rn|jd�ddd	�j�}|j	d
|�d��Ptjd|tj�r,|j	d
|�d
��Pq,WWdQRXdS)a)
        Collect the kinit command output for the system with id_provider "AD"
        or "IPA" domains.

        While integrating the Linux M/c with AD the realmd will create a
        computer object on the AD side. The realmd and AD restrict the
        Hostname/SPN to 15 Characters.
        z/etc/sssd/sssd.conf�rzutf-8)�encodingz\s*id_provider\s*=\s*ad�.rN�zMKRB5_TRACE=/dev/stdout                                             kinit -k 'z$'z\s*id_provider\s*=\s*ipa�')
�socketZgetfqdnZpath_isfile�open�re�match�
IGNORECASE�split�upperr)rZhostnameZ	sssd_conf�f�liner
r
rr
+s 




zKrb5.collect_kinit)rr)
�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesr	rr
r
r
r
rrs
rc@seZdZdZdZdS)�
RedHatKrb5�	krb5-libs�krb5-serverz/var/kerberos/krb5kdcN)r#r$)rrr �packagesr	r
r
r
rr"Gsr"c@seZdZdZdZdS)�
UbuntuKrb5�krb5-kdc�krb5-config�	krb5-userz/var/lib/krb5kdcN)r'r(r))rrr r%r	r
r
r
rr&Msr&)
rrZsos.report.pluginsrrrrrr"r&r
r
r
r�<module>s
7

NineSec Team - 2022