This shows you the differences between two versions of the page.
isc:labs:03 [2024/10/21 12:47] florin.stancu [03. [15p] Password Hashing] |
isc:labs:03 [2025/01/23 12:36] (current) radu.mantu [03. [15p] Password Hashing] |
||
---|---|---|---|
Line 86: | Line 86: | ||
Test if you were successful by trying to log in (''su'') using the new password. | Test if you were successful by trying to log in (''su'') using the new password. | ||
- | **References:** | + | <note warning> |
- | * https://python.readthedocs.io/en/stable/library/crypt.html | + | **crypt** was deprecated in PEP 594. See [[https://docs.python.org/3/library/crypt.html|this]] for alternatives. **legacycrypt** works.</note> |
<solution -hidden> | <solution -hidden> | ||
Line 133: | Line 133: | ||
* perform prints from the Python script, | * perform prints from the Python script, | ||
* do not print anything else. | * do not print anything else. | ||
+ | |||
+ | <note tip> | ||
+ | If you need to debug your //auth.py// script, delete the ''quiet'' parameter from the PAM config. Now, your stdout and stderr are no longer suppressed. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | The PAM module may return different error codes depending on the nature of the error. Use the **errno** tool to check their meaning. | ||
+ | |||
+ | <code bash> | ||
+ | $ apt install errno | ||
+ | $ errno 13 | ||
+ | EACCES 13 Permission denied | ||
+ | </code> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Remember that ''^?'' sequences (where ''?'' certain upper-case letters) represents a control character. If you get an error that contains such a sequence, take a look at the hexdump. | ||
+ | </note> | ||
**References:** | **References:** |