* [RFC PATCH] bringup: Give the kdevops user on the test nodes a specific UID
@ 2024-05-10 14:08 cel
0 siblings, 0 replies; only message in thread
From: cel @ 2024-05-10 14:08 UTC (permalink / raw)
To: kdevops; +Cc: Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
I was getting unexpected "Permission denied" errors when the target
nodes tried to install a Linux kernel built on the host.
9p works only when the kdevops user has the same UID on the control
and target nodes.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
scripts/bringup_guestfs.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Not sure this is the right solution, I'm no 9p expert. but it seems
to work.
diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
index dbace8d5d502..8e8574d1dd5e 100755
--- a/scripts/bringup_guestfs.sh
+++ b/scripts/bringup_guestfs.sh
@@ -58,9 +58,14 @@ _EOT
fi
# basic pre-install customization
+ KDEVOPS_UID=""
+ TEST_UID=`id -u kdevops`
+ if [ $? -eq 0 ]; then
+ KDEVOPS_UID="-u ${TEST_UID}"
+ fi
cat <<_EOT >>$cmdfile
install sudo,qemu-guest-agent,python3,bash
-run-command useradd -m kdevops -s /bin/bash
+run-command useradd ${KDEVOPS_UID} -s /bin/bash -m kdevops
append-line /etc/sudoers.d/kdevops:kdevops ALL=(ALL) NOPASSWD: ALL
_EOT
--
2.45.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-10 14:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-10 14:08 [RFC PATCH] bringup: Give the kdevops user on the test nodes a specific UID cel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.