Switching users in a bash script?

Angel Tsankov fn42551 at fmi.uni-sofia.bg
Sun Aug 27 01:49:55 PDT 2006


> 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

Excellent! This is exactly what I was looking for. Thanks a lot!



More information about the lfs-support mailing list