LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-16-2009, 06:01 AM   #1
bucovaina78
Member
 
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian,Ubuntu,Finnix,LFS
Posts: 271

Rep: Reputation: 32
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
 
Old 10-16-2009, 07:30 PM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

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


Reply


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 04:49 PM
How do I make a simple script and make it run on bootup?? coolblue Programming 5 12-18-2006 09:55 PM
I need to make simple script. sly_guy69 Linux - Newbie 4 01-22-2005 08:23 PM
How to make a simple addition in a shell script. philipina Programming 2 03-16-2004 04:38 AM
make install by root or lfs? bingbang Linux From Scratch 2 02-29-2004 10:36 AM


All times are GMT -5. The time now is 01:45 AM.

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