Switching users in a bash script?

Scott harview at montana.com
Sun Aug 27 11:19:38 PDT 2006

On Sat, Aug 26, 2006 at 06:11:43PM -0700, veritosproject at gmail.com wrote:
> Here's how you pipe commands.
> Throw an "exit" on the end of that, your root password on the front, giving:
> 123456
> ./configure --prefix=/usr
> make
> make install
> exit
> Then simply call:
> echo build-package-name.txt | su

I tried that before. On my system (Mandrake 10.1) I get:

  stdin must be tty

Thinking about it, behaviour other than this would be an immense
security breach, no?

Scott Swanson


More information about the lfs-support mailing list