Open main menu

CDOT Wiki β

Changes

OPS235 Lab 4 - CentOS7

305 bytes removed, 20:34, 10 April 2015
no edit summary
::  echo "The file pathname \"$inputFile\" is empty or does not exist" >&2
::  exit 2
::fi<br><br>::set $(sed 's/ /+/g' $inputfile) # temporarily convert spaces to + for storing lines as positional parameters<br><br>
::for x
::do
 ::&nbsp; &nbsp; useradd -m -c "$(echo $x | cut -d":" -f2 | sed 's/+/ /g')" -p $(date | md5sum | cut -d" " -f1) $(echo $x | cut -d":" -f1) ::&nbsp; &nbsp; mail -s "Server Account Information" $(echo $x | cut -d":" -f3) <<+::&nbsp; Here is your server account information: ::&nbsp; servername: myserver.senecac.on.ca::&nbsp; username: $userName::&nbsp; password: $userPassword ::&nbsp; Regards,::&nbsp; IT Department
::+
::done
<ol>
<li value="8">Save, set permissions, and then run that shell script for the application input text file '''gedituser-data.txt'''. Did it create that reportwork? Try running the script without an argument - What did it do? <li>Use the <b><code>wget</code></b> command to download, study, and run the following shell scripts on-line:<blockquote><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">https://scs.senecac.on.ca/~murray.saul/packageInfoGraphical.bash</span></code></b></blockquote></li><li>Try to understand what this Bash Shell script does.</li><li>#You have completed lab3lab4. Proceed to Completing The Lab, and follow the instructions for "lab sign-off".</li></ol>
'''Answer Investigation 3 observations / questions in your lab log book.'''
13,420
edits