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
snota45
5 months, 2 weeks ago