13,420
edits
Changes
no edit summary
|-
|'''Script #1 User Account Management:''' [ [http://cs.senecac.on.ca/~murray.saul/create-users.bash create-users.bash] ]<br>Sample of new employee database: [ [https://scs.senecac.on.ca/~murray.saul/new-users.txt /root/new-users.txt] ]<br><br>'''Scripting Skills:'''<blockquote><ul><li>'''if''' statement</li><li>'''Testing for existence of regular file'''</li><li>'''Arrays'''</li><li>'''Math''' Expressions</li><li>'''exit''' command</li><li>USER '''Environment Variable'''</li><li>'''redirection''' (both > and >>)</li><li>'''useradd'''</li><li>'''for''' loop</li><li>'''command substitution'''</li><li>'''mail'''</li><li>'''awk''' command ('''positional parameters''')</li></ul></blockquote><br><br>'''Practical Consideration for scripting in lab4:'''<br><blockquote>
'''Practical Consideration for scripting in lab4lab3:''' '''Possible "teachable area" to add as end of lab4 for students to learn manipulating data files for mass (batch) processing'''. Do students create simple bash shell script, add elements, then have them copy and paste, then run this more complex script? Is lab2 too long for scripting element to be included? Key elements of scripting elements should be contained in information boxes in lab. Should midterm and/or final exam contain a scripting question? (recommended)<br><br>
|[[Image:lab4_1.png|thumb|left|375px|When executed as '''root''' or using '''sudo''' command, allows for creation of many user accounts (stored in a user database in /root/new-users.txt]]
|}