You are not logged in.

#1 2020-10-11 18:14:38

leminhman0312
Banned
Registered: 2020-07-12
Posts: 24

How to show asterisks GRUB menu password

.

Last edited by leminhman0312 (2024-09-22 15:42:08)

Offline

#2 2020-10-11 18:38:08

frostschutz
Member
Registered: 2013-11-15
Posts: 1,652

Re: How to show asterisks GRUB menu password

in grub/grub-core/normal/auth.c :: grub_username_get you can see how it prints each letter you type (line 191)

in grub/grub-core/lib/crypto.c :: grub_password_get you can see how it does not and there is no option to (line 482)

I have not tried it but I assume you'd have to patch the password_get function to print *** same way username_get does it (both functions look very similar) and compile it yourself

in grub-core/lib/crypto.c around line ~480

      if (cur_len + 2 < buf_size)
	buf[cur_len++] = key;

change to

      if (cur_len + 2 < buf_size)
	{
	  buf[cur_len++] = key;
	  grub_printf ("*");
	}

Last edited by frostschutz (2020-10-11 18:50:13)

Offline

#3 2020-10-11 18:58:24

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: How to show asterisks GRUB menu password

leminhman0312 wrote:

With the GRUB menu entry protection above, if I make a mistake then I would need to force type the wrong password; so that GRUB would exit back out to the menu list.  I would then choose the entry again and proceed again to type in username/password.

Or just hit backspace and wait a few seconds, usually that blanks whatever and you can start again without any problems, so far it works everywhere...

One reverse thing would be to make systemd NOT echo passwords...it's the only offender on my system...but that's unrelated to this post... hmm

Last edited by GaKu999 (2020-10-11 18:58:44)


My reposSome snippets

Heisenberg might have been here.

Offline

Board footer

Powered by FluxBB