diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-07-18 01:04:22 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-07-18 01:04:22 +0800 |
commit | ef61313366e6ca42298c4a48ecbe50c50c125b12 (patch) | |
tree | db0ea25d083be06a9d95f15699f15f5618a0eff1 /chapter07 | |
parent | 28bdcfe0ef164ea92e1debc35bf71e62e29a5c4b (diff) |
do not use UID hack for tester
It's causing "root-tester namesis" (both have UID 0) if the tty is owned
by root. To fix bash test, use Expect to spawn a new PTY for it.
Diffstat (limited to 'chapter07')
-rw-r--r-- | chapter07/createfiles.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 93abeaf8e..c55d40836 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -175,7 +175,7 @@ EOF</userinput></screen> user. We add this user here and delete this account at the end of that chapter.</para> -<screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd +<screen><userinput>echo "tester:x:101:101::/home/tester:/bin/bash" >> /etc/passwd echo "tester:x:101:" >> /etc/group install -o tester -d /home/tester</userinput></screen> |