I am trying to setup a Linux machine with LDAP authentication and root account enabled. There is no issue with the LDAP server and everything works fine.
I wanted to disable local users so I tried editing PAM. I tried using pam-auth-update and untick the "Unix authentication". Local user successfully denied but so do root account.
I am now trying different things at the pam.d files but it seems I screw up multiple times and don't know what am I doing.
Editing the /etc/pam.d/common-auth file
auth sufficient pam_rootok.so
I added this line, then there is no password prompt and it login directly
auth pam_succeed_if.so uid = 0 quiet
I added this line and it does nothing I am now reading the pam configuration so anyone could help me understand and solve my problem?