Skip to content

Commit

Permalink
fix sudo for the test user in the all-snap image
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Sep 21, 2016
1 parent be2af0c commit 7a4bead
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions tests/lib/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ setup_reflash_magic() {

# we need the test user in the image
chroot $UNPACKD adduser --quiet --no-create-home --disabled-password --gecos '' test
echo 'test ALL=(ALL) NOPASSWD:ALL' >> $UNPACKD/etc/sudoers.d/99-test-user

# modify sshd so that we can connect as root
sed -i 's/\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' $UNPACKD/etc/ssh/sshd_config
Expand Down
3 changes: 0 additions & 3 deletions tests/main/regression-home-snap-root-owned/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
summary: Regression test that ensures that $HOME/snap is not root owned for sudo commands

# does not run currently on core because sudo has no tty there
systems: [-ubuntu-core-16-64]

prepare: |
# ensure we have no snap user data directory yet
rm -rf /home/test/snap
Expand Down

0 comments on commit 7a4bead

Please sign in to comment.