John Thornton wrote:

>I'm sure everyone takes shortcuts to build EMC. I made a couple of shell 
>scripts that 
>I put in my home directory called go2 and go3.
>
>go2
>
>#!/bin/bash
>cd emc2-2.2.x/src
>./configure --enable-run-in-place --enable-build-documentation
>echo Starting Make
>make > 1make.txt
>sudo make setuid
>cd ..
>cd ..
>  
>
Those could be shortened to `cd ../..`  :)

>My question is how can I pass my password to the "sudo make setuid" line?
>  
>
I don't see any way to do that, and it's generally undesirable anyway.  
Sticking a plaintext password in a script isn't exactly a 
security-conscious way of doing things.  If your computer is relatively 
fast, you could just issue some sudo command before running the script 
(or as the first line in the script), to get the password out of the 
way.  Something like `sudo ls` would do it.  If the PC isn't so fast, 
you can extend the password timeout in the /etc/sudoers file.

>The make > 1make.txt sends the normal output to the file so all I see it 
>warnings 
>and errors which makes it easier for me to see them after the run...
>
Yep.  Actually, there may be some errors that don't get logged that 
way.  You can also redirect stderr to stdout, if you want to catch those 
also:
make 2>&1 > 1make.txt
the 2>&1 redirects file 2 (stderr) to file 1 (stdout), then the > 
redirects stdout to the file.

- Steve


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to