mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Added full sudo support for admin user
This commit is contained in:
parent
3cfe26cebb
commit
7fc00d4939
12 changed files with 42 additions and 7 deletions
13
upd/add_sudo.sh
Executable file
13
upd/add_sudo.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue