Difference between revisions of "Operating Systems/Linux/Ubuntu/Ubuntu 16.04 LTS/Program-Settings"
Jump to navigation
Jump to search
| Line 9: | Line 9: | ||
# Dictionary-based password checks can be enabled by adding the line <code>password requisite pam_pwquality.so</code> to the end of the file | # Dictionary-based password checks can be enabled by adding the line <code>password requisite pam_pwquality.so</code> to the end of the file | ||
#* This is important because it prevents users from using common words in their password | #* This is important because it prevents users from using common words in their password | ||
| − | === | + | ===Prevent Duplicate Passwords=== |
# <code>sudo nano /etc/pam.d/common-password</code> | # <code>sudo nano /etc/pam.d/common-password</code> | ||
| − | # | + | # Duplicate passwords can be prevented by adding the line <code>password required pam_unix.so remember=5</code> to the end of the file |
| − | #* This | + | #* This will make the system remember past passwords so that users can't use the same password multiple times. |
| + | |||
===Max/Min password age=== | ===Max/Min password age=== | ||
# <code>sudo nano /etc/login.defs</code> | # <code>sudo nano /etc/login.defs</code> | ||
Revision as of 22:49, 30 November 2023
Password Security
When you need to mess with password security policy in Linux three useful files are /etc/security/pwquality.conf, /etc/pam.d/common-password, and /etc/login.defs
Minimum Password Length
sudo nano /etc/pam.d/common-password- The minimum password length can be set to 10 by adding "minlen=10" to the end of this line:
password [success=1 default=ignore] pam_unix.so obscure yescrypt minlen=10
Dictionary Based Password Checks
sudo nano /etc/pam.d/common-password- Dictionary-based password checks can be enabled by adding the line
password requisite pam_pwquality.soto the end of the file- This is important because it prevents users from using common words in their password
Prevent Duplicate Passwords
sudo nano /etc/pam.d/common-password- Duplicate passwords can be prevented by adding the line
password required pam_unix.so remember=5to the end of the file- This will make the system remember past passwords so that users can't use the same password multiple times.
Max/Min password age
sudo nano /etc/login.defs- Scroll very far down until you reach the line PASS_MAX_DAYS. Set it equal to 30.
- This is important because it requires users to change their password every 30 days
Other
Disable IPv4 Forwarding
sudo nano /etc/sysctl.conf- Add the line
net.ipv4.ip_forward=0to the end of the file sudo sysctl -p(this applies the settings)- Use the command
sysctl net.ipv4.ip_forwardto check if it's disabled (0 means it's disabled)