To Enabling/Unlocking the root locked account, follow below steps:
1.ssh with non root user
2.Check the root user is locked:
root@Ubuntu:/home/test# passwd -S root
root L 11/12/2024 0 99999 7 -1
>> here L means its locked.
3.Manually enable the root account
A)verify the /etc/shadow password (the second field ! Or * means its locked)
B)Create a password in hash format:
openssl passwd -6
>>give new password
>>Copy the new hash password
C)Edit /etc/shadow and update in the second field:
D)Verify /etc/ssh/sshd_config have "PermitRootLogin=yes, PasswordAuthentification=yes" and restart ssh service already done.
Comments
Post a Comment