┌───────────────────────┐
│ │
│ help: install │
│ │
└───────────────────────┘
Install:
1. Install software: (if not installed)
# apt install sudo
# apt install mc
2. Edit file /etc/sudoers
# mcedit /etc/sudoers
3. Add this to the end of the /etc/sudoers file:
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/scripts/php.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/scripts/samba.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/scripts/admin.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/scripts/ups_hat.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/scripts/setquota.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/scripts/apache.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/scripts/delete.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/scripts/materials.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/scripts/vserver.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/scripts/alta.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/scripts/passwords.sh
usuaris ALL=(ALL) NOPASSWD: /path/to/usuaris_se/admin/DNS/scripts/DNS.sh
If Apache does not display the website at /~user/ ...
On Arch Linux-based systems, to get web content in /~user/ working, edit file
/etc/systemd/system/httpd.service.d/hardening.conf
and set...
ProtectHome=off
Then run...
systemctl daemon-reload
If php-fpm ignores sudo...
(a)- Edit php-fpm config:
sudo systemctl edit php-fpm
(b)- Add the following lines at the top:
[Service]
PrivateDevices=false
NoNewPrivileges=false
ProtectSystem=yes
(c)- Save file, and restart php-fpm