getent passwd aliceUseful on systems backed by LDAP or other NSS sources.
High-value Linux permissions and security reference covering users, sudo, ACLs, special mode bits, SSH access, SELinux, and AppArmor basics.
Audit identities, SSH access, and authentication-related state.
getent passwd aliceUseful on systems backed by LDAP or other NSS sources.
getent group dockerUseful when group data is not only in local `/etc/group`.
sudo passwd -l deployUseful during account offboarding or incident response.
sudo chage -l aliceUseful for compliance and access reviews.
sudo visudoAlways use `visudo` instead of editing sudoers directly.
sudo sshd -tRun before restarting SSH to avoid locking yourself out.
cat id_ed25519.pub >> ~/.ssh/authorized_keysEnsure permissions on `~/.ssh` and `authorized_keys` are strict.
Go beyond rwx with ACLs, sticky bit, and setuid/setgid.
Allow only owners to delete their own files in a shared directory.
chmod +t /shared/tmpCommon on world-writable directories like `/tmp`.
chmod g+s /srv/sharedUseful for team-shared directories.
find / -perm -4000 -type f 2>/dev/nullUseful for security audits and hardening reviews.
find / -xdev -type d -perm -0002 2>/dev/nullUseful for security posture reviews.
setfacl -d -m g:appteam:rwx shared/Useful in team collaboration directories.
Inspect and work with Linux mandatory access control frameworks.
getenforceCommon first step on SELinux-enabled hosts.
sestatusProvides more context than `getenforce`.
sudo restorecon -Rv /var/www/htmlVery useful when copied files have wrong SELinux labels.
sudo semanage port -a -t http_port_t -p tcp 8080Required when services move to nonstandard ports on SELinux systems.
sudo aa-statusUseful on Ubuntu and other AppArmor-enabled systems.
journalctl -t audit --since '1 hour ago'Helpful when security policy blocks access and you need clues quickly.