On Tue, Aug 18, 2015 at 2:09 AM, Scott Mattan s-mattan@niscom.co.jp wrote:
Hello,
I am seeing some disparity between (two distributions granted) CentOS 6.6 and Fedora22 in their use of the su utility. I cannot figure out the cause, so I cannot fix it.
In CentOS there is no way to script login to root... this is of course a desirable trait. for instance, [ user@localhost user ]$ su root <<EOF
password echo "" id EOF
standard in must be a tty
$ (sleep 1; echo password) | python -c "import pty; pty.spawn(['/bin/su','-c','id']);"
Some programs require stdin on a tty, su has gone back and forth on it. It really doesn't stop anything.
John