From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [RFC PATCH] bringup: Give the kdevops user on the test nodes a specific UID
Date: Fri, 10 May 2024 10:08:35 -0400 [thread overview]
Message-ID: <20240510140835.399244-1-cel@kernel.org> (raw)
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
reply other threads:[~2024-05-10 14:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240510140835.399244-1-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).