Bird
0
0

You want to migrate all users from MD5 to SCRAM authentication without forcing immediate password resets. What is the best approach?

hard📝 Application Q9 of 15
PostgreSQL - Roles and Security
You want to migrate all users from MD5 to SCRAM authentication without forcing immediate password resets. What is the best approach?
AUse trust method temporarily during migration
BChange all to scram-sha-256 and force password reset immediately
CKeep md5 only until users manually update passwords
DEnable both md5 and scram-sha-256 methods in pg_hba.conf with IP-based rules
Step-by-Step Solution
Solution:
  1. Step 1: Understand compatibility of md5 and scram-sha-256

    Users with MD5 passwords can still connect if md5 is allowed; new users can use SCRAM.
  2. Step 2: Use IP or user-based rules to allow both methods during migration

    This allows gradual migration without forcing immediate resets.
  3. Final Answer:

    Enable both md5 and scram-sha-256 methods in pg_hba.conf with IP-based rules -> Option D
  4. Quick Check:

    Allow both methods for smooth migration [OK]
Quick Trick: Allow both md5 and scram during migration for smooth transition [OK]
Common Mistakes:
  • Forcing immediate resets unnecessarily
  • Using trust during migration
  • Keeping only md5 and ignoring SCRAM

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes