When I try to log in as root, it always shows the error like this. I tried to use apt install sudo and apt-get update but nothing has changed
Asked
Active
Viewed 39 times
2
Run the shell specified by the target user's password database entry as a login shell. This means that login-specific resource files such as .profile, .bash_profile or .login will be read by the shell.
– Prvt_Yadav Dec 25 '22 at 12:00getent passwd root
. The last:
-delimited item in the list return from that command is the login shell for the root user. If it saysjohny
then you have set the login shell of the root user tojohny
and this would be why you can't log in as root. Also, please never post images of text. – Kusalananda Dec 25 '22 at 12:09type sudo
if there is some alias or function defined... – Vlastimil Burián Dec 25 '22 at 12:13