5

I've gotten myself into a weird situation. I just installed Debian on a virtual machine I made so that I can ease into it before I try dual booting. I went through all the set up, and as a test to see if I did it all right, I went to install wine (that should double check the Internet connection as well as make sure my sudo password is working. Unfortunately, I got the "wrong password try again" error. After some digging around on the internet I found out the following facts:

  1. Debian user accounts don't come standard with root access (that's a good thing).
  2. There is no such thing as a root user in Debian. There is a user group of "sudoers" instead.
  3. You can't add anyone to the sudoer group without root access yourself.

Given that information, I found out that the one account I have does not have root access and therefore doesn't have the ability to give access (to itself or any other account). So, how on earth do I get an account with root access? I feel like I'm missing something really simple here, but I can't imagine what it is.

  • I can understand it's confusing... On one system I configured, there were two users, one in the sudoers list and the other not. Then when the other user needed to sudo, they had to enter the password of the first user rather than the password for root. Not sure why Debian works this way. – Mr Lister May 27 '16 at 10:57
  • 3
    These facts fly in in the face of every Debian box I've ever installed. In my experience: 1. During installation the user is always asked for a root password. 2. Root user is essential in Debian because sudo is not installed by default. 3. Of course. Which flavour of Debian did you install? Perhaps it's a new "feature". – roaima May 27 '16 at 12:49
  • From where did you get 1 and 2? That's the case for Ubuntu but not for debian. You should have gotten asked for a root password on installation. Did you try to run su with it? – Guido May 27 '16 at 14:45
  • @Guido I did get the password prompt at installation. I assumed that sudo status would automatically be added to the first user I made, or would at least be able to just use the root password from the lower privileged user. – unknown May 27 '16 at 19:39
  • Also, thanks @lesmana for improving my title. I should not be posting this kind of stuff at two in the morning. – unknown May 27 '16 at 19:40
12

Looks like you missed something. From the Debian documentation:

6.3.2. Setting Up Users And Passwords

Just before configuring the clock, the installer will allow you to set up the “root” account and/or an account for the first user. Other user accounts can be created after the installation has been completed.

6.3.2.1. Set the Root Password

The root account is also called the super-user; it is a login that bypasses all security protection on your system. The root account should only be used to perform system administration, and only used for as short a time as possible.

Any password you create should contain at least 6 characters, and should contain both upper- and lower-case characters, as well as punctuation characters. Take extra care when setting your root password, since it is such a powerful account. Avoid dictionary words or use of any personal information which could be guessed.

If anyone ever tells you they need your root password, be extremely wary. You should normally never give your root password out, unless you are administering a machine with more than one system administrator.

If you do know the root password instead of using sudo you can use su -.

su - 

will become root once you enter the root password.

  • I think I may have missed the space between su and -. I will try it as soon as I can get to my computer. – unknown May 27 '16 at 16:57
  • Yep that worked. Turns out it was the space. That, and using the password for my other VM. I really need to stop trying to make virtual machines at two in the morning. – unknown May 27 '16 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.