Amministrazione utenti e permessi
1. Utenti
useradd -m -s /bin/bash nomeutente
passwd nomeutente
usermod -aG sudo nomeutente
userdel -r vecchioutente
2. Gruppi
groupadd developers
usermod -aG developers nomeutente
groups nomeutente
3. Permessi (rwx)
chmod 755 script.sh # rwxr-xr-x
chmod 644 file.txt # rw-r--r--
chmod 700 privato/ # rwx------
chown utente:gruppo file.txt
chown -R www-data:www-data /var/www/
4. Sudo avanzato
visudo
# Permetti solo alcuni comandi senza password
nomeutente ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart apache2
%developers ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart *
5. ACL avanzate
apt install -y acl
setfacl -m u:webdev:rwx /var/www/html/
getfacl /var/www/html/
Risultato: Gestione completa di utenti, gruppi, permessi Unix, sudo e ACL.