2018-01-17 20:40:19 +00:00
|
|
|
From 884a0e2cbe195db86c4ba25518654857fe3761ac Mon Sep 17 00:00:00 2001
|
2016-08-25 18:42:57 +00:00
|
|
|
From: Robert Marshall <rmarshall@redhat.com>
|
|
|
|
Date: Mon, 22 Feb 2016 15:30:05 -0500
|
2018-01-17 20:40:19 +00:00
|
|
|
Subject: [PATCH 173/225] Warn if grub password will not be read (#1290803)
|
2016-08-25 18:42:57 +00:00
|
|
|
|
|
|
|
It is possible for a system to have never run grub-mkconfig and add the
|
|
|
|
section that reads the user.cfg file which contains a user set GRUB
|
|
|
|
password. Users in that scenario will now be warned that grub-mkconfig
|
|
|
|
must be run prior to their newly set password taking effect.
|
|
|
|
|
|
|
|
Resolves: rhbz#1290803
|
|
|
|
---
|
|
|
|
util/grub-setpassword.in | 5 +++++
|
|
|
|
1 file changed, 5 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/util/grub-setpassword.in b/util/grub-setpassword.in
|
2017-06-16 19:31:32 +00:00
|
|
|
index dd76f00fc..fb9d3a3b6 100644
|
2016-08-25 18:42:57 +00:00
|
|
|
--- a/util/grub-setpassword.in
|
|
|
|
+++ b/util/grub-setpassword.in
|
|
|
|
@@ -121,3 +121,8 @@ fi
|
|
|
|
install -m 0600 /dev/null "${grubdir}/user.cfg" 2>/dev/null || :
|
|
|
|
chmod 0600 "${grubdir}/user.cfg" 2>/dev/null || :
|
|
|
|
echo "GRUB2_PASSWORD=${MYPASS}" > "${grubdir}/user.cfg"
|
|
|
|
+
|
|
|
|
+if ! grep -q "^### BEGIN /etc/grub.d/01_users ###$" "${grubdir}/grub.cfg"; then
|
|
|
|
+ echo "WARNING: The current configuration lacks password support!"
|
|
|
|
+ echo "Update your configuration with @grub_mkconfig@ to support this feature."
|
|
|
|
+fi
|
|
|
|
--
|
2018-01-17 20:40:19 +00:00
|
|
|
2.14.3
|
2016-08-25 18:42:57 +00:00
|
|
|
|