Valid EX300 Dumps shared by ExamDiscuss.com for Helping Passing EX300 Exam! ExamDiscuss.com now offer the newest EX300 exam dumps, the ExamDiscuss.com EX300 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com EX300 dumps with Test Engine here:
Create a script to add users Create a script named /root/mkusers on the system1, this script can achieve to add local users for the system1, and user names of these users are all from a file which contains the usernames list, and meet the following requirements at the same time: 1. This script is required to provide a parameter; this parameter is the file which contains the usernames list 2. This script need provide the following message: Usage:/root/mkusers if it does not provide a parameter, then exit and return the corresponding value 3. This script need provide the following message: Input file not found if it provides a name that does not exist, then exit and return the corresponding value 4. Create a user shell log into /bin/false 5. This script does not need to set password for users 6. You can get the usernames list from the following URL as a test: http://rhgls. domain11.example.com/ materials/ userlist
Correct Answer:
See Explanation Explanation/Reference: vim mkusers.sh #! /bin/bash if [ $# -eq 0 ];then echo 'Usage:/root/mkusers' exit 1 fi if [ ! -f $1 ]; then echo 'Input file not found' exit fi while read line do useradd -s /bin/false $line done < $1 : wq chmod +x mkusers.sh wget http://rhgls.domain11.example.com/materials/userlist ./mkusers.sh userlist