How to Show Users in MySQL
CREATE USER 'sammy'@'%' IDENTIFIED BY 'password' WITH MAX_USER_CONNECTIONS 3;
GRANT PROCESS, SELECT on *.* TO 'sammy'@'%';
# GRANT ALL PRIVILEGES ON *.* TO 'sammy' WITH GRANT OPTION;
FLUSH PRIVILEGES;
SELECT user FROM mysql.user;
SHOW GRANTS FOR 'sammy'@'%';
REVOKE SELECT ON *.* FROM 'sammy'@'%';
DROP USER 'sammy'@'%';
sudo -l
-l, --list If no command is specified, list the allowed (and forbidden) commands for the invoking user (or the user specified by the -U option) on the current host. A longer list format is used if this option is specified multiple times and the security policy supports a verbose output for‐mat.
If a command is specified and is permitted by the security policy, the fully-qualified path to the command is displayed along with any command line arguments. If a command is specified but not allowed by the policy, sudo will exit with a status value of 1.
Blocking Specific Kernel Updates
To lock a package from being installed, updated or removed, we can use the apt-mark command.
To lock a package from being installed, updated or removed, we can use the apt-mark command.
sudo apt-mark hold linux-image-$(uname -r)
sudo apt-mark hold linux-headers-$(uname -r)
disable auto-upgrades
prune journalctl
sed -i -e 's/Update-Package-Lists \"1/Update-Package-Lists \"0/g' /etc/apt/apt.conf.d/20auto-upgrades
prune journalctl
echo "SystemMaxUse=500M" >> /etc/systemd/journald.conf && journalctl --vacuum-size=500M && journalctl --vacuum-time=10d && systemctl restart systemd-journald.service