FG
💻 Software

Bash & 'su' script giving an error "standard in must be a tty"

Fresh7 days ago
Mar 15, 202642066 views
Confidence Score0%
0%

Problem

Folks, I'm having an issue with a bash script which runs a particular command as a different user. The background: Running on a Linux box (CentOS), the script is quite simple, it's starting the hudson-ci application. This is the abridged version of the script, when run, the script exits with "stand…

Error Output

declare -r HOME=/home/hudson
declare -r RUNAS=hudson
declare -r HOME=/home/hudson
declare -r LOG=hudson.log
declare -r PID=hudson.pid
declare -r BINA…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Bash & 'su' script giving an error "standard in must be a tty"

Low Risk

In your /etc/sudoers file, try commenting out the line that says "Defaults requiretty". There are security implications of doing so, so you might want to instead add this line below: Be sure to use the visudo command to edit this file, rather than a…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment