Added full sudo support for admin user

This commit is contained in:
Serghey Rodin 2014-09-02 15:48:49 +03:00
commit 7fc00d4939
12 changed files with 42 additions and 7 deletions

13
upd/add_sudo.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
if [ ! -e /etc/sudoers.d/admin ]; then
echo "# Created by vesta update-trigger" > /etc/sudoers.d/admin
echo "# $(date)" >> /etc/sudoers.d/admin
echo "admin ALL=(ALL) ALL" >> /etc/sudoers.d/admin
echo "admin ALL=NOPASSWD:/usr/local/vesta/bin/*" >> /etc/sudoers.d/admin
chmod 440 /etc/sudoers.d/admin
if [ -z "$(grep /etc/sudoers.d /etc/sudoers)" ]; then
echo -e "\n#includedir /etc/sudoers.d" >> /etc/sudoers
fi
fi