← 返回命令列表

Linux command

pwconv 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert to shadow passwords

pwconv

Verbose conversion

pwconv -R [/]

说明

pwconv creates or updates the /etc/shadow file from /etc/passwd, migrating password hashes from the world-readable passwd file to the root-only-readable shadow file. This is a fundamental security measure that prevents unprivileged users from accessing password hashes for offline cracking. The command is part of shadow-utils and is typically run once during initial system setup or when converting a legacy system to shadow passwords. It preserves existing shadow entries and only adds or updates entries as needed.

参数

-R _ROOT_
Chroot directory.

FAQ

What is the pwconv command used for?

pwconv creates or updates the /etc/shadow file from /etc/passwd, migrating password hashes from the world-readable passwd file to the root-only-readable shadow file. This is a fundamental security measure that prevents unprivileged users from accessing password hashes for offline cracking. The command is part of shadow-utils and is typically run once during initial system setup or when converting a legacy system to shadow passwords. It preserves existing shadow entries and only adds or updates entries as needed.

How do I run a basic pwconv example?

Run `pwconv` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -R _ROOT_ do in pwconv?

Chroot directory.