← 返回命令列表

Linux command

grub2-mkpasswd-pbkdf2 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo grub2-mkpasswd-pbkdf2

Example

sudo grub2-mkpasswd-pbkdf2 -c [10000] -s [64]

说明

grub2-mkpasswd-pbkdf2 generates hashed passwords for protecting GRUB 2 bootloader configuration. The output hash can be used in grub.cfg to password-protect boot entries or the GRUB command line. PBKDF2 (Password-Based Key Derivation Function 2) provides strong protection against brute-force attacks by using multiple iterations and a random salt. The resulting hash is safe to store in configuration files.

参数

-c, --iteration-count _COUNT_
Number of PBKDF2 iterations (higher is more secure but slower)
-s, --salt _LENGTH_
Length of the salt in bytes

FAQ

What is the grub2-mkpasswd-pbkdf2 command used for?

grub2-mkpasswd-pbkdf2 generates hashed passwords for protecting GRUB 2 bootloader configuration. The output hash can be used in grub.cfg to password-protect boot entries or the GRUB command line. PBKDF2 (Password-Based Key Derivation Function 2) provides strong protection against brute-force attacks by using multiple iterations and a random salt. The resulting hash is safe to store in configuration files.

How do I run a basic grub2-mkpasswd-pbkdf2 example?

Run `sudo grub2-mkpasswd-pbkdf2` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --iteration-count _COUNT_ do in grub2-mkpasswd-pbkdf2?

Number of PBKDF2 iterations (higher is more secure but slower)