Grub пароль на загрузку windows убрать

Для отключение запроса пароля для других ОС в загрузчике добавить опцию —class os —unrestricted в строку menuentry требуемой ОС в конфигурационном файле загрузчика /boot/grub/grub.cfg.

Данная статья применима к:

  • Astra Linux Special Edition РУСБ.10015-01 (очередное обновление 1.7), РУСБ.10015-10
  • Astra Linux Special Edition РУСБ.10015-17
  • Astra Linux Special Edition РУСБ.10015-37 (очередное обновление 7.7)
  • Astra Linux Special Edition РУСБ.10015-03 (очередное обновление 7.6)
  • Astra Linux Special Edition РУСБ.10152-02 (очередное обновление 4.7)
  • Astra Linux Special Edition РУСБ.10015-01 (очередное обновление 1.6)
  • Astra Linux Special Edition РУСБ.10015-16 исп. 1
  • Astra Linux Common Edition 2.12

I have set Grub2 password following this thread. It works fine but now it prompts for username and password every time I start or restart my computer. It’s actually the first thing it does.

Now, if the Grub config files get corrupted for some reason, I’m basically locked out of accessing anything. What I want is to have options, to be able to access my desktop and edit the config files without being Grub blocked, in case something goes wrong, but still have a password prompt when pressing shift key to access Grub menu.

This is how my 40_custom file looks like:

#!/bin/sh
exec tail -n +3 $0
set superusers="xxx"
password_pbkdf2 xxx hashed_password

I also looked into this thread where a similar question was asked and answered but the method was slightly different and it was for older versions of Ubuntu. I would gladly try out the solutions but I really don’t want to mess things up and lock myself out.

So is there a safe way to achieve this? Would editing /etc/grub.d/10_linux suffice?

Thanks for your answers in advance.

UPDATE:

So I decided to try out the solution above and it worked but not without slight adjustments. I modified the /etc/grub.d/10_linux, added --unrestricted to the line 132:

echo "menuentry '$(echo "$os" | grub_quote)' --unrestricted ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"

Note that you shouldn’t make any changes to the line 130 above that says '$(echo "$title" | grub_quote)' or you won’t be able to access Grub menu by pressing shift key from the boot. At least I was not able to.

After running sudo update-grub and restarting it will go straight past Grub, giving the desired effect. On the other hand, if the Grub menu is called upon, it will show the menu but whenever trying to hit any of the advanced options, including console and edit, it will prompt for username and password.

Hopefully, this will help someone in the same situation.

0 / 0 / 0

Регистрация: 20.07.2023

Сообщений: 7

1

18.08.2023, 09:20. Показов 495. Ответов 4


Студворк — интернет-сервис помощи студентам

Здравствуйте, можно ли каким-то образом отключить запрос пароля при выборе Windows 10 в загрузчике GRUB?



0



85 / 71 / 16

Регистрация: 03.06.2022

Сообщений: 476

18.08.2023, 10:01

2

Наверное можно установить виндовс рядом на часть винчестера и не устанавливать пароль при установке.



0



0 / 0 / 0

Регистрация: 20.07.2023

Сообщений: 7

18.08.2023, 10:08

 [ТС]

3

На компе уже изначально стоял виндовс, только потом рядом я поставил Астра Линукс, всё на одном диске



0



Эксперт HardwareЭксперт WindowsАвтор FAQ

8587 / 3017 / 507

Регистрация: 14.04.2011

Сообщений: 7,530

18.08.2023, 18:46

4

Лучший ответ Сообщение было отмечено slivka088 как решение

Решение

Цитата
Сообщение от slivka088
Посмотреть сообщение

потом рядом я поставил Астра Линукс

Наконец-то хоть какая-то информация.
Попробуйте так: в Axtra Linux Файловая система -> /etc/grub.d Скопируйте файл 07_password в «укромное место», чтобы восстановить его в случае необходимости, затем откройте /etc/grub.d/07-password и удалите в этом файле запись (чтобы там было пусто), сохраните изменения файла и после этого обновите grub

После этого проверить, как будет проходить загрузка Windows.



1



0 / 0 / 0

Регистрация: 20.07.2023

Сообщений: 7

22.08.2023, 08:38

 [ТС]

5

Спасибо, получилось!



0



NOTE: This is not a rock solid secured way of disabling access to your pc. But atleast for those “Windoze users” who have no clue wtf is a grub, it’s going to be pretty effective! I’m going to teach you how to enable as well as disable grub password.

Enable GRUB password:

1. Open terminal and type as root:

# cp /boot/grub/menu.lst /boot/grub/menu.lst.backup

2. Now that your GRUB is backed up. Type:

# grub

grub> md5crypt

Password: ******** [Type in the password that you want to encrypt!]

Now copy the encrypted message it gives you!

grub> quit

3. Open /boot/grub/menu.lst.backup and paste the message after initrd line. If you have a number of Grub entries , you must paste it [or use a different encrypted password using the above method] for every entry that you want to password protect! Use it like this:

title           Debian GNU/Linux, squeeze/sid
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.30-1-amd64 root=/dev/hda2 ro splash quiet vga=791
initrd          /boot/initrd.img-2.6.30-1-amd64

password – -md5 gasgd6876b2dsd2d/

paste the code after “password – -md5”

Note: Since wordpress has the weird habit of showing double hyphen as a single large one, I put a space in between the two, you just need to put two hyphens without any space in between!

Disable/Hack GRUB password:

1. You need a Linux live CD for this.

2. Insert the CD and boot from it.

3. In command line [or if you’re using ubuntu cd 😛 open a terminal and type]:

$ su

# fdisk -l [to check the name of the root directory]

# mount -t ext3 -o rw /dev/sda2 /mnt

[change ext3 to ext4 and /dev/sda2 according o the fdisk -l output]

# chroot /mnt /bin/bash

# nano /boot/grub/menu.lst

Now just remove the password line from the grub menu. 😛 Simple eh? Now save , unmount the partition and reboot!

DbAppWeb.com

Menu

You can remove the GRUB Password after login into the system, follow the steps given below:

  • Login into the system through root user.
  • Open the grub.conf file into vi editor.
    [root@server ~]# vi /boot/grub/grub.conf
    
    OR
    [root@server ~]# vi /etc/grub.conf
  • Comment the password line in the grub.conf file or remove this line.
    #password --md5 $1$V5LfgE/TgfdfdfgGpZR77/
  • Save the grub.conf file.

Subscribe to Blog via Email

  • Grub invalid signature windows 10
  • Gt 710 2gb драйвер для windows 7
  • Grub не видит windows 10 astra linux
  • Grub how to boot windows
  • Gt 710 1gb драйвер для windows 10