1

I have just set up a Remote Desktop connection on Ubuntu LTS server and whenever I tries to install something a window prompts and asks for a password. I have tried the password but it’s not accepting it. I don't know what password it is asking for but It's not the one that I have set.

I tried looking on the Google and got some ways to resolve it but as soon as I follow it in the terminal I get another error stating User is not in the sudoers file. The incident will be reported. Then I looked on Internet to solve it but then they they say to write su -s in the terminal but then I get the error su:Authentication failure.

Kulfy
  • 17,696
  • I use 18.04 LTS version of Ubuntu – BHAVANSH ARORA Aug 12 '20 at 09:06
  • The reason for this is the user through which you enter commands is not the part of "super user group". All the users in "super user group" can execute command as a root user. Even if you specify the correct password for that specific user. Unless it is part of "super user group" it cannot execute sudo – White Mars Aug 12 '20 at 09:15

1 Answers1

0

The reason for this is the user through which you enter commands is not the part of "super user" group. All the users in "super user" group can execute command as a root user. Therefore, even if you specify the correct password for that specific user unless it is part of "super user" group" it cannot execute sudo.

To solve the issue you need to add this user to the sudoers file.
To do this you can follow these commands :

sudo usermod -aG sudo user

Replace the user with the username you want to add to the sudoers. The -aG option tells the system to append the user to the specified group. (The -a option is only used with G.).

As you can see to add someone to the sudoers you first need a user who can exercise the "super user" rights. So either add this user to sudoers or you can use the user which is already added in "super user" group.

You can also read this

P.S.

On some Linux distributions like Ubuntu, the root user account is disabled by default for security reasons. This means that no password is set for root and you cannot use su to switch to root. This explains the reason for su:Authentication failure

One option to change to root would be to prepend the su command with sudo and enter the currently logged in user password:

sudo su -

However it is not recommend to switch to root user to perform actions as it will have permission issues when you try to access or make changes later.

  • This solves that query but still I am getting the pop up saying authentication is required to install untrusted software in ubuntu desktop. – BHAVANSH ARORA Aug 12 '20 at 10:49
  • This is because when you the download/install require root privileges. If you are using Ubuntu Software application to download something, then use terminal and type sudo ubuntu-software this will run software center as root and you will not get pop-up. However the reason of these issues originated when your OS was installed. You probably configured a lot of this at that time as a root user and because of it most of the things might now need root privilege to work – White Mars Aug 12 '20 at 11:14
  • Yes, but I need to download some applications that are not there in the ubuntu-software so need to fix it.So ,what should I do. – BHAVANSH ARORA Aug 13 '20 at 17:59
  • the only way to solve it is to add the user you are using to sudoers list. And then download what you need using sudo – White Mars Aug 13 '20 at 18:22
  • Okay can you please share me some resource so that I could do that. – BHAVANSH ARORA Aug 13 '20 at 18:28
  • The answer I wrote explains how to do it, there is also a link at the end which gives more detailed explanation, you can follow that too – White Mars Aug 13 '20 at 19:06