su: must be run from a terminal

This is a pretty well explained guide…Upgrading Simple Shells to Fully Interactive TTYs - ropnop blog