Tag Info

New answers tagged

2

If it's just you creating the websites and no other user needs access to it you can just change the apache config to run the webserver as your user. in the terminal change the permissions of /var/www/html to your user sudo chown -R username:username /var/www/html Then change your apache envvars sudo nano /etc/apache2/envvars And change the lines to ...


2

You can prepend sudo to all the commands. Make sure to run the script as root, the unprivileged user will be put in as needed #/bin/bash do-something-neat # Run as invoking user (root) sudo -u randomuser do-something-else # Run as "randomuser" user make potato --type=Mashed # Run as invoking user (root) ...


30

By default adduser adds every new user to a group with the same name as the user's (the group is created if it doesn't already exists). So if you create a user called admin it will be added to the group admin. /etc/sudoers contains the line %admin ALL=(ALL) ALL which means that all members of the group admin are allowed to use sudo - and that's true for ...



Top 50 recent answers are included