Skip to main content

Lab 5.4 - Best Practices

Objectives​

  • Apply the principle of least privilege
  • Secure accounts
  • Document configurations

Exercise 1: Audit​

# Check users without a password
sudo awk -F: '($2 == "") {print $1}' /etc/shadow

# Users with login shell
grep -E '/bin/(bash|sh|zsh)$' /etc/passwd

Lab created on: December 2024 - Tested on Ubuntu 24.04