Virtual Machine Requirements
- There must NOT be a graphical interface
- You must NOT be able to connect to a root user via ssh
- UFW and Sudo must be installed and properly configured
- The root user must be your login + 42 [login42] and the normal user must be your login.
- The normal user should remain in the sudo and user42 groups.
Intro
Explain some concepts.
Password directives
/etc/login.defs:
[....]
PASS_MAX_DAYS 30
PASS_MIN_DAYS 2
PASS_WARN_AGE 7
[....]
/etc/pam-d/common-password:
[....]
password requisite pam_pwquality.so retry=3 minlen=10 maxrepeat=3 ucredit=-1 lcredit=-1 dcredit=-1 reject_username enforce_for_root difok=7
[....]
- return: Number of attempts before the system returns an error.
- minlen: Minimum password length.
- maxrepeat: the maximum number of times a single character may be repeated.
- ucredit: Capitalized characters that must be present.
- lcredit: Capitalized characters that must be present.
- lowercase characters it must have.
- dcredit: The number of digits the new password must have.