6

I'm trying to install Virtualbox on my Ubuntu 18.04 but I encountered some problems because of Secure Boot. So I'm following this tutorial which seems a good solution.

But here is my problem : When I reboot and choose 'Enroll MOK' on the 'blue window', I enter my password, but it always fail... I tried many times, and everytime I remove .priv and .der files to re-generate them with openssl command, but agains and again :

"The password doesn't match"

I'm pretty sure that I enter the same password when I generate files with mokutil command.

Am I missing something ?

Rémi
  • 311

6 Answers6

11

I had the same problem and it enventually worked by typing the password as if I had a qwerty keyboard in the MOK manager, though it is an azerty one... (note that I used a short password as suggested, I don't know if this counted as well...)

Yoënn Burban
  • 111
  • 1
  • 2
  • 1
    I solved my problem using this method as well! – sniper71 Jul 10 '20 at 06:34
  • 1
    same. My password was quite long (10 chars) – Gab Aug 03 '21 at 11:46
  • When setting the password, it must be with at least 8 characters now. Just don't use symbols (only a-z, A-Z, 0-9; not "ñáü.-/...") and you will be ok (at least if you have a qwerty keyboard). – PhoneixS Sep 29 '22 at 11:36
3

After several attempts, I finally found a solution... The password cannot be longer than x characters, and I think is 5, according to this post.

I find it strange, but I hope it can help someone !

Rémi
  • 311
  • Well the prompt for password during the NVidia driver install complains if I try to use a short password: "The Secure Boot key you've entered is not valid. The password used must be between 8 and 16 characters." – Gunnar Forsgren - Mobimation Apr 25 '19 at 10:00
  • 2
    It asks you for the secure boot password, this post is about a MOK password. I think you've choose your secure boot password when you installed your OS. – Rémi Apr 25 '19 at 10:14
2

I had the same issue on Ubuntu 18.04. It seems like the BIOS keyboard layout is different than the one on my laptop. I used 10 characters, both numbers and letters, and it accepted once I typed a 'y' for a 'z' and a 'z' for a 'y'. My keyboard layout is hungarian, like so: qwertzu...

Lorenz Keel
  • 8,905
hunny14
  • 21
1

It worked for me in this way:

Use letters (I had nine letters) instead of numbers (like it is indicated in many examples) for the temporal password, when it is created using:

sudo mokutil --disable-validation

Then:

  • Reboot.

  • Press any key when the MOK management blue screen is displayed.

  • Select "Change Secure Boot state".

  • Enter, one at at time, the letter of your pasword at the asked position and hit enter.

  • After several letters (not all were tested), answer yes to "disable Secure Boot".

  • Start the PC.

  • Open a terminal in your Linux environment.

  • Load the vboxdrv modules with

    lsmod | grep vboxdrv
    
  • The following message is displayed when the modules are correctly loaded

    vboxdrv               454656  3 vboxnetadp,vboxnetflt,vboxpci
    

And that's it!

Kulfy
  • 17,696
1

I think the issue is for non-QWERTY keyboard users, that is the huge majority of Linux users. I used a password with the keys that are common between QWERTY and my AZERTY keyboard and it worked fine.

user68186
  • 33,360
  • Welcome to Ask Ubuntu. This is a question answer site not a discussion forum. If you think you found a bug, please find a bug report. Please do not put comments inside your answer. – user68186 Mar 10 '23 at 13:16
0

I had the same issue when trying to enroll a MOK on a NUC with Kubuntu 20.04 LTS. Inspired by Rémys post I tried various passwords, however in my case it did neither work with five nor four letters. Because I don't know the BIOSs keyboard setup I chose different passwords without x and y.

Finally I used only numbers and - hooray - it worked. Hope this helps at least in some case.

Have fun!

Trinimon
  • 191