From 23a3fea868c21be09a2c31df2d70825db2d6eb3a Mon Sep 17 00:00:00 2001 From: Koshkoshinsk Date: Thu, 30 Apr 2026 09:26:34 +0000 Subject: [PATCH] Add passwordless sudo step to root warning instructions Setup steps like install-node.sh and install-docker.sh run sudo non-interactively. Without NOPASSWD, password prompts can silently hang when piped through the setup runner. Co-Authored-By: Claude Opus 4.6 --- nanoclaw.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index fdb24a1..fd35c47 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -156,9 +156,18 @@ if [ "$(uname -s)" = "Linux" ] && [ "$(id -u)" -eq 0 ]; then printf '\n %s\n' "$(bold 'To set up a regular user:')" printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" - printf ' %s\n' "$(dim '3. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" - printf ' %s\n' "$(dim '4. Log out: exit')" - printf ' %s\n' "$(dim '5. Log back in as the new user: ssh nanoclaw@your-server')" + printf ' %s\n' "$(dim '3. Enable passwordless sudo: echo "nanoclaw ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/nanoclaw')" + printf ' %s\n' "$(dim '4. Copy SSH keys to new user: cp -r ~/.ssh /home/nanoclaw/.ssh && chown -R nanoclaw:nanoclaw /home/nanoclaw/.ssh')" + printf ' %s\n' "$(dim '5. Log out: exit')" + printf ' %s\n' "$(dim '6. Log back in as the new user: ssh nanoclaw@your-server')" + printf ' %s\n' "$(dim '7. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" + printf ' %s\n\n' "$(dim '8. Re-run setup: bash nanoclaw.sh')" + printf ' %s\n\n' "$(bold 'If you are using a web terminal (hosting provider console):')" + printf ' %s\n' "$(dim '1. Create a new user: adduser nanoclaw')" + printf ' %s\n' "$(dim '2. Add to sudo group: usermod -aG sudo nanoclaw')" + printf ' %s\n' "$(dim '3. Enable passwordless sudo: echo "nanoclaw ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/nanoclaw')" + printf ' %s\n' "$(dim '4. Log out: logout')" + printf ' %s\n' "$(dim '5. Log in as the new user at the login prompt')" printf ' %s\n' "$(dim '6. Clone the repo: git clone https://github.com/qwibitai/nanoclaw.git && cd nanoclaw')" printf ' %s\n\n' "$(dim '7. Re-run setup: bash nanoclaw.sh')" exit 1