Merge pull request #53 from serghey-rodin/master

Pull from official repo
This commit is contained in:
myvesta 2020-03-24 21:01:57 +01:00 committed by GitHub
commit 8af131b19c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -22,6 +22,9 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
if [ "$user" = "root" ]; then
check_result $E_FORBIDEN "Changing root password is forbiden"
fi
check_args '2' "$#" 'USER PASSWORD'
is_format_valid 'user'
is_object_valid 'user' 'USER' "$user"

View file

@ -688,6 +688,7 @@ chmod 755 /usr/bin/rssh
mkdir -p /etc/sudoers.d
cp -f $vestacp/sudo/admin /etc/sudoers.d/
chmod 440 /etc/sudoers.d/admin
sed -i "s/%admin.*ALL=(ALL).*/# sudo is limited to vesta scripts/" /etc/sudoers
# Configuring system env
echo "export VESTA='$VESTA'" > /etc/profile.d/vesta.sh

View file

@ -4,3 +4,5 @@ if [ -e "/etc/sudoers.d/admin" ]; then
sed -i "s/admin.*ALL=(ALL).*/# sudo is limited to vesta scripts/" \
/etc/sudoers.d/admin
fi
sed -i "s/%admin.*ALL=(ALL).*/# sudo is limited to vesta scripts/" /etc/sudoers