aboutsummaryrefslogtreecommitdiff
path: root/_ops/awwan-test/mkosi.postinst.chroot
diff options
context:
space:
mode:
Diffstat (limited to '_ops/awwan-test/mkosi.postinst.chroot')
-rwxr-xr-x_ops/awwan-test/mkosi.postinst.chroot26
1 files changed, 26 insertions, 0 deletions
diff --git a/_ops/awwan-test/mkosi.postinst.chroot b/_ops/awwan-test/mkosi.postinst.chroot
new file mode 100755
index 0000000..783eb64
--- /dev/null
+++ b/_ops/awwan-test/mkosi.postinst.chroot
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -x
+
+## User testing sudo with password prompt.
+## The password is "awwan".
+
+useradd --create-home --user-group \
+ --password '$2a$10$XVhjfOB4Un5DJE4TQEBPrOHfBVGVWP4iA3ElUMzcbJ7jdc2zZPgZ2' \
+ awwan
+
+mkdir -p /home/awwan/src
+mkdir -p /home/awwan/.cache/go-build
+mkdir -p /home/awwan/go/pkg/mod
+
+chown -R awwan:awwan /home/awwan/
+chmod 0755 /home/awwan
+
+## User testing with ssh.
+
+useradd --create-home --user-group --groups wheel \
+ --password '$2a$10$XVhjfOB4Un5DJE4TQEBPrOHfBVGVWP4iA3ElUMzcbJ7jdc2zZPgZ2' \
+ awwanssh
+
+chown -R awwanssh:awwanssh /home/awwanssh/
+chmod 0755 /home/awwanssh