Switching users in a bash script?

veritosproject at gmail.com veritosproject at gmail.com
Sat Aug 26 18:11:43 PDT 2006


On 8/26/06, Shane Shields <shane.shields at erkunttarim.com.tr> wrote:
> On Saturday 26 August 2006 12:18 pm, Angel Tsankov wrote:
> > Hello!
>
> Hello
>
> Use sudo. Thats what I used and very successfully. I did a bash script, fully
> rpm'ised with no problems.
> --
> Shane Shields
>
> Registered LFS Compiler: 7582
> To drink the WINE of success you must first seek the sayings of source
>
> Anyone sending unwanted advertising e-mail to this address will be
> charged $25 for network traffic and computing time. By extracting my
> address from this message or its header, you agree to these terms.
>
>
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>

Here's how you pipe commands.

First, let's say that this is the compilation instructions:
START FILE
./configure --prefix=/usr
make
make install
END FILE

Throw an "exit" on the end of that, your root password on the front, giving:
START FILE
123456
./configure --prefix=/usr
make
make install
exit
END FILE

Then simply call:
echo build-package-name.txt | su



More information about the lfs-support mailing list