Checking Root Account Status

 

Checking Local Root Account Status
  • Run sudo passwd -S root: Look for the status letter in the output. An L means the account is locked (disabled), while a P means it has a usable password.
  • Check /etc/shadow directly: Run sudo getent shadow root or sudo grep root /etc/shadow. If the second field (the password hash field) starts with an ! or *, the password is locked and direct login is disabled. [1, 2]
Checking Remote SSH Root Login Status
  • Test the effective SSH setting: Run sudo sshd -T | grep permitrootlogin. If it outputs permitrootlogin no or prohibit-password, remote root access via password is disabled.
  • Inspect the configuration files: Check /etc/ssh/sshd_config and files inside /etc/ssh/sshd_config.d/ for PermitRootLogin no

Checking Root Account Status

  Checking Local Root Account Status Run sudo passwd -S root : Look for the status letter in the output. An L means the account is locked (...

Mais vistos