GIT – Question: I’m unable to do su – on . It says “su: Authentication failure”. How do I fix it? Also, is it possible for me to login to using account directly?

Answer: Let us address these two question one by one.

Warning: Enabling root is not recommended. If possible, you should always try to perform all administrative tasks using sudo.

Question 1: I’m unable to login using su command. How to fix this?

By default, root account is locked in Ubuntu. So, when you do su -, you’ll get Authentication failure error message as shown below.

$ su -
su: Authentication failure

Enable super user account password on Ubuntu

First, set a password for root user as shown below.

$ sudo passwd root
[sudo] password for ramesh:
Enter new  password:
Retype new  password:
passwd: password updated successfully

Now with the new password you can login as super user with su command

$ su -

Disable super user account password on Ubuntu

Later if you don’t want to use su anymore, you can lock the root user password using one of the methods shown below

$ sudo passwd -l root

( or )

$ sudo usermod -p '!' root

Question 2: How do I login to Ubuntu directly using root account?

First, you should allow the root user to be logged in from the X as explained below.

Step 1: Go to System -> Administration -> Login window.

Step 2: In the tab, click on the check box “Allow local system administrator” as shown below. After this change, reboot the system and login directly using root account.

Ubuntu Login Window Preferences - Enable root login

Print Friendly



Bài viết liên quan