aboutsummaryrefslogtreecommitdiffstats
path: root/insidechroot.sh
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-03-29 20:43:11 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-03-29 20:43:11 -0500
commit24ae50590b533a53cbc254854ec7159c5e02c804 (patch)
tree6162cd79e672e999a1e74409a31247a064c30ecb /insidechroot.sh
parentebc7e4f32d27e0d3bb82d42db5d20f768948289f (diff)
Add TESTUSERID when chrooting and use 'id -u' commnd to get user id. Use when adding tester user to passwd.
Diffstat (limited to 'insidechroot.sh')
-rw-r--r--insidechroot.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/insidechroot.sh b/insidechroot.sh
index 88a5d26..57951ab 100644
--- a/insidechroot.sh
+++ b/insidechroot.sh
@@ -131,7 +131,7 @@ nogroup:x:99:
users:x:999:
EOF
- echo "tester:x:$(ls -n "$(tty)" | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd
+ echo "tester:x:${TESTERUID}:101::/home/tester:/bin/bash" >> /etc/passwd
echo "tester:x:101:" >> /etc/group
install -o tester -d /home/tester
@@ -162,4 +162,3 @@ EOF
else
printf "%b" "Do Chapter 8, 9 and 10 stuff here.\n"
fi
-