Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 10-16-2009, 07:01 AM   #1
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287

Rep: Reputation: 33
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:

cat > /path/passwordfile << "EOF"

Here I paste my original passwordfile
Old 10-16-2009, 08:30 PM   #2
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a simple script more concise Aseem Linux - Newbie 11 09-16-2009 05:49 PM
How do I make a simple script and make it run on bootup?? coolblue Programming 5 12-18-2006 10:55 PM
I need to make simple script. sly_guy69 Linux - Newbie 4 01-22-2005 09:23 PM
How to make a simple addition in a shell script. philipina Programming 2 03-16-2004 05:38 AM
make install by root or lfs? bingbang Linux From Scratch 2 02-29-2004 11:36 AM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration