From 2aaddf4611043ecf59576bba8423af28c35ab249 Mon Sep 17 00:00:00 2001 From: skyper <5938498+SkyperTHC@users.noreply.github.com> Date: Fri, 28 Jun 2024 20:34:39 +0100 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b2854ea..bf1faf3 100644 --- a/README.md +++ b/README.md @@ -1814,7 +1814,7 @@ Needed for taking screenshots of X11 sessions (aka `xwd -root -display :0 | conv # NAME="UserName" ### <-- Set UserName U=$(id -u ${NAME:?}) \ G=$(id -g ${NAME:?}) \ -&& H="$(grep "$U" /etc/passwd | cut -d: -f6)" \ +&& H="$(grep "^${NAME}:" /etc/passwd | cut -d: -f6)" \ && HOME="${H:-/tmp}" python3 -c "import os;os.setgid(${G:?});os.setuid(${U:?});os.execlp('bash', 'bash')" # change bash to -bash to make this a login shell. ```