pam_unix: bcrypt option naming discrepancy between shadow-utils and pam
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- c
- Ambito
- authentication
Direzione di ricerca
Start with the pam_unix option handling referenced in modules/pam_unix/support.h, then trace how the module interprets ENCRYPT_METHOD and the blowfish option. Compare the accepted names with the shadow-utils behavior cited in the issue and decide on the compatible naming expected by PAM. Done means bcrypt configuration no longer produces the reported unrecognized-value errors; check or add focused tests for the option handling.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
There seems to be a discrepancy in algoritm naming between PAM and shadow-utils.
pam_unix supports "blowfish":
https://github.com/linux-pam/linux-pam/blob/master/modules/pam_unix/support.h#L141C34-L141C42
while shadow-utils supports "bcrypt", not "blowfish":
https://github.com/shadow-maint/shadow/blob/master/lib/encrypt.c#L49
https://github.com/shadow-maint/shadow/blob/master/src/newusers.c#L434
Configuring bcrypt as the password hash algorithm using the following steps:
- Put
blowfishin/etc/pam.d/password-authand/etc/pam.d/system-authin line containingpassword sufficient, i.e.:
password sufficient pam_unix.so blowfish shadow try_first_pass use_authtok
according to pam_unix(8).
2. Put ENCRYPT_METHOD BCRYPT in /etc/login.defs, according to crypt(5).
3. Put crypt_style = blowfish in /etc/libuser.conf, according to libuser.conf(5).
4. Try running any command that uses PAM, e.g. sudo -i.
This leads to error messages such as:
Mar 23 10:36:06 systemd[1846535]: pam_unix(systemd-user:account): unrecognized ENCRYPT_METHOD value [BCRYPT]
...
Mar 23 10:36:07 su[1846533]: pam_unix(su:session): unrecognized ENCRYPT_METHOD value [BCRYPT]
...
Mar 23 10:40:37 sudo[1849297]: pam_unix(sudo-i:account): unrecognized ENCRYPT_METHOD value [BCRYPT]
Mar 23 10:40:37 sudo[1849297]: pam_unix(sudo-i:setcred): unrecognized ENCRYPT_METHOD value [BCRYPT]
Mar 23 10:40:37 sudo[1849297]: pam_unix(sudo-i:session): unrecognized ENCRYPT_METHOD value [BCRYPT]
Mar 23 10:40:37 sudo[1849297]: pam_unix(sudo-i:session): unrecognized ENCRYPT_METHOD value [BCRYPT]
Mar 23 10:40:37 sudo[1849297]: pam_unix(sudo-i:setcred): unrecognized ENCRYPT_METHOD value [BCRYPT]
Now, I'm not sure which needs fixing, shadow-utils or PAM, but it'd be best if they could agree on common naming of this option.
Related issue for shadow-utils: https://github.com/shadow-maint/shadow/issues/1625 .
- Lingua principale
- C
- Stelle
- 807
- Fork
- 368
- Merge medio
- 6g 16h
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di linux-pam/linux-pam
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
[RFE] To have a option for pam_faillock to match UID instead of username to lock the account.Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 47/100
Tutte le issue di linux-pam/linux-pam
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
ChupathingyCE/chupathingyce#1020 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
enhancement good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
-
C:dataplane
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
yanet-platform/yanet2#3395 ·
I maintainer di solito rispondono entro 1 giorno
-
Crash in mdns componentAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
openvehicles/Open-Vehicle-Monitoring-System-3#1575 ·
I maintainer di solito rispondono entro 4 giorni