1

I removed a password for the viral user with this command

sudo passwd -d 'viral'

After that, I tried to login as a root user in terminal but it's asking me for a password and tells me to try again.

How can I solve this problem?

prolificslacker
  • 1,255
  • 8
  • 15
Viral Nakrani
  • 111
  • 1
  • 6
  • What are those 's? What are those suppose to do? – Rinzwind Jun 04 '17 at 16:09
  • I am trying to do something as a root user but its ask me for a password.I couldn't do anything @Rinzwind – Viral Nakrani Jun 04 '17 at 16:15
  • 2
    The root account is disabled by default on Ubuntu: see [RootSudo](https://help.ubuntu.com/community/RootSudo). If you have *also* disabled the only `sudo` account, then you will need to re-enable it from recovery mode: see for example [How do I add myself back as a sudo user?](https://askubuntu.com/a/70445/178692) – steeldriver Jun 04 '17 at 18:16

1 Answers1

1

Apparently you have deleted (-d) the password for the user 'viral'. So if root-login asks for password, it is as designed.

If you do sudo passwd root and enter new password twice as prompted, you should be able to login in terminal as root. Don't ever let root have no password, and avoid using root-login as your normal login. Almost all operations that needs root permissions can be done with sudo.

Soren A
  • 6,442
  • 2
  • 17
  • 33