trove/integration/scripts/files/elements/ubuntu-guest/post-install.d/13-trove-guest-sudoers
Lingxian Kong aa1d4d2246 Datastore containerization
Significant changes:

* Using docker image to install datastore.
* Datastore image is common to different datastores.
* Using backup docker image to do backup and restore.
* Support MariaDB replication
* Set most of the functional jobs as non-voting as nested
  virtualization is not supported in CI.

Change-Id: Ia9c97a63a961eebc336b70d28dc77638144c1834
2020-05-27 10:31:50 +12:00

16 lines
510 B
Bash
Executable File

#!/bin/bash
set -e
set -o xtrace
# CONTEXT: HOST after IMAGE BUILD as SCRIPT USER
# PURPOSE: add the guest user account to the /etc/sudoers files with NOPASSWD
# Adds user to the sudoers file so they can do everything w/o a pass
# Some binaries might be under /sbin or /usr/sbin, so make sure sudo will
# see them by forcing PATH
TEMPFILE=`mktemp`
echo "${GUEST_USERNAME} ALL=(ALL) NOPASSWD:ALL" > $TEMPFILE
chmod 0440 $TEMPFILE
sudo chown root:root $TEMPFILE
sudo mv $TEMPFILE /etc/sudoers.d/60_trove_guest