brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: sudo -l shows what a user may run as root, a quick security check of sudoers

Security
~/tips/tip-security-sudo-l-list-privileges

sudo -l

Shows which commands a user may run with sudo and under which conditions.

Over time sudo rules pile up. Listing them takes one command and shows rights nobody planned.

sudo -l
sudo -l -U deploy
sudo visudo -c

sudo -l prints the commands your account may run and as whom. Look for NOPASSWD: ALL and for editors, shells or interpreters in a rule, because those turn a narrow right into full root access. -U deploy shows the list for another user, which you can do as root.

visudo -c checks the syntax of the sudoers files, including the ones in /etc/sudoers.d, without changing anything.

Further reading: sudo manual page

More Security tips tcpdump -nn -r capture.pcap port 53 mkcert -install Strict-Transport-Security: max-age=0 Referrer-Policy: strict-origin-when-cross-origin wp super-admin list All Security tips (79) All topics

Link