Я пытаюсь диагностировать проблему на машине CentOS в корпоративной среде. Это ящик, настроенный кем-то другим перед уходом из компании. Проблема в том, что когда мы отправляем su пользователю gitlab, мы фактически являемся пользователем gitauth. В каталоге / etc или его подкаталогах нет ничего, что содержало бы строку gitauth. Что могло вызвать это? Возможно, внешний профиль для пользователя в ActiveDirectory или LDAP? Мой основной вопрос: что мне искать, чтобы указать, откуда пришел пользователь gitauth?
[me@blah ~]$ sudo su - gitlab
[gitauth@blah ~]$ id
uid=398473190(gitauth) gid=398473190(gitauth) ...
Вывод из authconfig с измененным именем организации:
caching is disabled
nss_files is always enabled
nss_compat is disabled
nss_db is disabled
nss_hesiod is disabled
hesiod LHS = ""
hesiod RHS = ""
nss_ldap is disabled
LDAP+TLS is disabled
LDAP server = ""
LDAP base DN = ""
nss_nis is disabled
NIS server = ""
NIS domain = ""
nss_nisplus is disabled
nss_winbind is disabled
SMB workgroup = ""
SMB servers = ""
SMB security = "user"
SMB realm = ""
Winbind template shell = "/bin/false"
SMB idmap uid = "16777216-33554431"
SMB idmap gid = "16777216-33554431"
nss_sss is disabled by default
nss_wins is disabled
nss_mdns4_minimal is disabled
DNS preference over NSS or WINS is disabled
pam_unix is always enabled
shadow passwords are enabled
password hashing algorithm is sha512
pam_krb5 is disabled
krb5 realm = "MGMT.OURDEPT"
krb5 realm via dns is enabled
krb5 kdc = "dc2mgmtdirqa01.mgmt.ourdept:88,dc2mgmtdirqa02.mgmt.ourdept:88"
krb5 kdc via dns is enabled
krb5 admin server = ""
pam_ldap is disabled
LDAP+TLS is disabled
LDAP server = ""
LDAP base DN = ""
LDAP schema = "rfc2307"
pam_pkcs11 is disabled
use only smartcard for login is disabled
smartcard module = ""
smartcard removal action = ""
pam_fprintd is disabled
pam_winbind is disabled
SMB workgroup = ""
SMB servers = ""
SMB security = "user"
SMB realm = ""
pam_sss is disabled by default
credential caching in SSSD is enabled
SSSD use instead of legacy services if possible is enabled
IPAv2 is disabled
IPAv2 domain was not joined
IPAv2 server = ""
IPAv2 realm = ""
IPAv2 domain = ""
pam_cracklib is enabled (try_first_pass retry=3 type=)
pam_passwdqc is disabled ()
pam_access is disabled ()
pam_mkhomedir or pam_oddjob_mkhomedir is disabled ()
Always authorize local users is enabled ()
Authenticate system accounts against network services is disabled
Чтобы узнать, откуда система получает справочную информацию, которая отчетливый из аутентификационной информации - загляните в /etc/nsswitch.conf
. Найдите строку, которая начинается с passwd:
; за этим последует список служб, запрашивающих информацию о пользователе. Это может выглядеть примерно так:
passwd: files
Или:
passwd: files ldap
Или, может быть:
passwd: files sss
Или даже:
passwd: files winbind
Или какая-то комбинация вышеперечисленного и, возможно, даже другие варианты.
Если он содержит ldap
, искать /etc/nslcd.conf
(или /etc/ldap.conf
для более старых версий CentOS). Если он содержит sss
, смотреть в /etc/sssd/sssd.conf
. Если он содержит winbind
посмотрите на свою конфигурацию Samba в /etc/samba/smb.conf
. Если есть что-то еще, дайте нам знать!