LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Make an simple install script for my pc LFS 6.5 (https://www.linuxquestions.org/questions/linux-from-scratch-13/make-an-simple-install-script-for-my-pc-lfs-6-5-a-762345/)

bucovaina78 10-16-2009 06:01 AM

Make an simple install script for my pc LFS 6.5
 
Since I'm having a lot of hickups installing my pc with LFS and have to begin over and over again I was wondering if it were possible to make a simple bash script that I write. If I have to begin again I can simply start the script, let the computer run until the point where it went wrong.


When I install my pc I copy all the commands to a text file that I make executable.

The only problem I see so far is to make the lfs username and the password because the shell will wait for input (the password).


Is there some way to provide the shell a password or to give a command to create a password file?

Something like:

Code:

cat > /path/passwordfile << "EOF"

Here I paste my original passwordfile
EOF


carltm 10-16-2009 07:30 PM

If you create the account, add the -p switch to useradd. Just get the
encrypted version of your password from /etc/passwd or /etc/shadow.

Otherwise you could use sed to replace your line in /etc/passwd or
/etc/shadow with your version of the encrypted password.


All times are GMT -5. The time now is 05:12 PM.