Created
December 8, 2020 08:42
-
-
Save mtovmassian/8e8f199dea6136a4dca46c48c5014b29 to your computer and use it in GitHub Desktop.
VMware drivers, such as vmmon and vmnet, are not able to be loaded if not signed before (this is likely to happen after update). This script helps to automaticly sign vmon and vmnet drivers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
main() { | |
today_date=$(date +%Y%m%d) | |
key_filename="VMWARE${today_date}.priv" | |
cert_filename="VMWARE${today_date}.der" | |
openssl req -new -x509 -newkey rsa:2048 -keyout "${key_filename}" -outform DER -out "${cert_filename}" -nodes -days 36500 -subj "/CN=VMWARE/" | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./"${key_filename}" ./"${cert_filename}" $(modinfo -n vmmon) | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./"${key_filename}" ./"${cert_filename}" $(modinfo -n vmnet) | |
# You will be prompt to set a password. | |
# Type 'bcde' to avoid azerty vs qwerty issue. | |
sudo mokutil --import "${cert_filename}" | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment