2

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

enter image description here

8
  • Can you check some files for root user as mentioned in the manual. 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, 2022 at 12:00
  • ok, how to run that?
    – Onanigod
    Dec 25, 2022 at 12:06
  • 1
    getent passwd root. The last :-delimited item in the list return from that command is the login shell for the root user. If it says johny then you have set the login shell of the root user to johny and this would be why you can't log in as root. Also, please never post images of text.
    – Kusalananda
    Dec 25, 2022 at 12:09
  • Run type sudo if there is some alias or function defined... Dec 25, 2022 at 12:13
  • 1

0

Browse other questions tagged .