0

I am prompted for a sudo password.

Since I am a user at a very basic level of knowledge, I am very shaky in getting to the terminal and/or using the commands. When I am told to take the step "enter sudo command", before which I am prompted for the "sudo password", what do I do?

I've never set a sudo password. I see from other questions that there is a facility called passwd; surely that has to be entered at the terminal... I'll try it.

muru
  • 197,895
  • 55
  • 485
  • 740
TonyB
  • 19
  • It's asking for your own password, with the assumption that you have 'sudo' privileges (ie. you can elevate your privileges and super-user-do) – guiverc Nov 12 '18 at 00:42

3 Answers3

1

The sudo password is your normal user password by default in Ubuntu.

vidarlo
  • 22,691
0

welcome to linux!

First, you have to add yourself as a sudo-er. You need to do this as root, so you will need the root password.

Log in as root and type the following command:

adduser yourusername sudo

The log back out and log in to the yourusername account like you normally would

You should now have sudo permissions. You can test this by running the following command:

sudo ls 

or some other benign command. If it accepts your password and runs the command, you are a sudo-er. You could also go to the settings and look in the user information, or probably another six different ways.

Your sudo password is cached in that terminal session for a while. So the next time you type a sudo command, it won't prompt you for a password.

Be careful though, if you are working as sudo, you can do great damage if you don't know what you're doing. Linux assumes you know what you're doing, with sudo there are no guardrails, you have the same power as root.

muru
  • 197,895
  • 55
  • 485
  • 740
  • Thanks, but we immediately meet a problem. How do I "log in as root". If I log in to my usual screen[desktop] and then try to get to terminal, will that do it? I notice "you can do great damage if you don't know what you're doing. Linux assumes you know what you're doing". I can state quite clearly I do not know what I am doing. I am a basic level user of the machine as word processor. I would prefer not to go to terminal and sudo, but software packages sometimes ask for sudo commands. – TonyB Nov 19 '18 at 16:08
0

su used to be an acronym for Super User, i.e. root but now it stands for Substitute User. Root is like the administrator on Windows. And this makes sudo an acronym of Super User DO or Substitute User DO. By default su or sudo refers to root account (unless specified) which is generally password protected. Root account is password protected in order to restrict apps/normal users to perform certain tasks which can effect the performance of system or cause security threats.

Now, the sudo password is the password you used at the time of installation. Also, whenever you enter password it is hidden, i.e. no character/bullets/stars will appear like in Windows.

Kulfy
  • 17,696
  • Thank you. Very useful from the point of view of explanation. My copy of Ubuntu was downloaded from the internet: if I had been prompted for a password, I would have made a note of it. I remember no such prompt. – TonyB Nov 19 '18 at 15:54
  • @TonyB Are you using Ubunu in VMWare/virtualbox? – Kulfy Nov 19 '18 at 20:09
  • Thank you @Kulfy. I have no idea what VMWare/virtualbox means. We must assume I am not using it. – TonyB Nov 24 '18 at 09:39