March 2002
Beginner
504 pages
10h 47m
English
| 1: | Add a check to the sshd init script that verifies if the user is root. (Init scripts should only be executed by root).
HINT: Use the id and sed commands. |
| 2: | The showperson script lists all matching entries in the address book based on a name provided by the user. The matches produced are case sensitive. How can you change the script matches so they aren't case sensitive? |
| 3: | Both the showperson and delperson scripts reproduce the following code
PATH=/bin:/usr/bin
# check that a name is given
if [ $# -lt 1 ] ; then
printUSAGE "`basename $0` name"
exit 1
fi
# check that the address book exists
MYADDRESSBOOK="$HOME/addressbook"
if [ ! -f "$MYADDRESSBOOK" ] ; then
printERROR "$MYADDESSBOOK does not exists, or is not a file."
exit 1
fi
|
Read now
Unlock full access