diff --git a/tools/server-setup.d/20-automation-user.sh b/tools/server-setup.d/20-automation-user.sh index 565c9dd..d103be9 100755 --- a/tools/server-setup.d/20-automation-user.sh +++ b/tools/server-setup.d/20-automation-user.sh @@ -1,6 +1,11 @@ #!/bin/bash -if ! cat -q "automation" /etc/passwd; then +if ! cat "$PATH" | grep -q "sbin"; then + # sudo is quirky + PATH="$PATH:/sbin" +fi + +if ! grep -q "automation" /etc/passwd; then echo "setting up automation user..." useradd -m automation