Защита паролем меню Grub не работает

Нет необходимости в escape-символах или чем-то еще. Я забыл указать полный путь к файлу, как в приведенной ниже команде. После этого это сработало.

mv "/opt/access_archive/$exported_file" "/opt/access_archive/${cdate}_$exported_file"
1
13.05.2021, 06:29
1 ответ

After setting password and add"--unrestricted" in every entry, both "choosing entry to boot" and "pressing e key to edit" don't need password.

Нет. Если для записи установлено --unrestricted, разрешена только загрузка без необходимости ввода имени пользователя и пароля. Редактирование пунктов меню(e)и использование командной строки(c)разрешено только пользователям, указанным в списке суперпользователей.

Из руководства GRUB(упор мой):

In order to enable authentication support, the ‘superusers’ environment variable must be set to a list of usernames, separated by any of spaces, commas, semicolons, pipes, or ampersands. Superusers are permitted to use the GRUB command line, edit menu entries, and execute any menu entry. If ‘superusers’ is set, then use of the command line and editing of menu entries are automatically restricted to superusers. Setting ‘superusers’ to empty string effectively disables both access to CLI and editing of menu entries.

и, кроме того,

Other users may be allowed to execute specific menu entries by giving a list of usernames (as above) using the --users option to the ‘menuentry’ command (see menuentry). If the --unrestricted option is used for a menu entry, then that entry is unrestricted. If the --users option is not used for a menu entry, then that only superusers are able to use it.

Чтобы иметь возможность загружать все записи без пароля, установитеset superusers=...(пустой список или список имен пользователей плюс одну запись пароля для каждого пользователя )и добавьте опцию --unrestrictedко всем пунктам меню.

1
28.07.2021, 11:32

Теги

Похожие вопросы