新建会话
Ctrl
K
Kimi Code 限时活动
历史会话
查看手机应用

Fedora Password Length Conflict

When installing Fedora using the new Anaconda WebUI, the password needs to be at least 6-character long. But passwd at the CLI requires at least 8 characters. How to force a shorter password?
This is a great question about password policy inconsistencies in Fedora's installation process. Let me search for the most current information about this, as Anaconda WebUI is relatively new and password policies may have changed.
搜索网页
Fedora Anaconda WebUI password minimum length 6 characters CLI 8 force shorter Fedora passwd minimum password length change policy 8 characters Anaconda WebUI password requirements vs CLI passwd Fedora
18 个结果
Based on the search results, I can explain this discrepancy and provide solutions. The inconsistency you've encountered is a known issue: Anaconda WebUI enforces a 6-character minimum while the CLI passwd command enforces 8 characters via pwquality PAM module configuration .

Why This Happens

Fedora's password policy is governed by /etc/security/pwquality.conf (and files in /etc/security/pwquality.conf.d/), which defaults to minlen = 8 . However, the Anaconda WebUI appears to use different validation logic that allows 6-character passwords . This is considered a bug/inconsistency that has been reported to Red Hat Bugzilla .

Solutions to Set a Shorter Password

Option 1: Use sudo (Recommended for one-time changes)

Run passwd as root to bypass restrictions:
bash
复制
sudo passwd username
Root can set any password regardless of length restrictions .

Option 2: Temporarily Lower Password Requirements

Edit the pwquality configuration to allow shorter passwords:
bash
复制
sudo nano /etc/security/pwquality.conf.d/99-weak.conf
Add:
plain
复制
minlen = 6
minclass = 0
dictcheck = 0
Note: The absolute minimum for minlen is 6 — you cannot go lower than 6 through this configuration .

Option 3: Use chpasswd (Bypasses all restrictions)

For passwords shorter than 6 characters, bypass PAM entirely:
bash
复制
sudo -i
echo -n "username:password" | chpasswd -c SHA512
This directly hashes the password without quality checks .

Option 4: Modify PAM Configuration (System-wide)

Edit the PAM stack to reduce requirements:
bash
复制
sudo nano /etc/pam.d/system-auth
Locate the pam_pwquality.so or pam_unix.so line and add minlen=6 (or lower for pam_unix specifically), though this affects all password changes system-wide .

Important Security Warning

Fedora's default 8-character minimum exists for good reason. Shorter passwords are significantly more vulnerable to brute-force attacks. If you must use a short password, consider:
  • Using this only for low-privilege accounts
  • Ensuring the system is not exposed to network access
  • Using full disk encryption (which you mentioned in your previous query about XFCE 4.20) to mitigate offline attacks
The discrepancy between Anaconda WebUI and CLI is likely to be fixed in future Fedora releases to align both at 8 characters .