Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vps:~# nano -w test.sh
- vps:~# nano -w userlist.txt
- vps:~# ls -la | grep test
- -rw-r--r-- 1 root root 7218 2009-09-27 14:44 test.sh
- vps:~# chmod +x test.sh
- vps:~# ./test.sh -h
- HELP SECTION FOR ADDING USER SCRIPT
- ----------------------------------------------------------------------------
- This script is made to read details from a file regarding user
- accounts and to create those accounts as appropriate.
- ----------------------------------------------------------------------------
- Only the root/administrative user, or user with administrative
- rights may use this script.
- ----------------------------------------------------------------------------
- The file that it reads from, 'userlist.txt', should exist. If that file
- does not exist (in the same directory), or is empty, there is no
- purpose for this script and it will not proceed.
- ----------------------------------------------------------------------------
- The structure of userlist.txt should be as follows:
- username:password:groupname:fullname
- Please do not use any spaces. No fields may be left blank.
- Any users with blank/invalid data will be skipped.
- ----------------------------------------------------------------------------
- Logs are stored in a file in the same directory called 'report.log'.
- If this file does not exist, it will be created.
- ----------------------------------------------------------------------------
- vps:~#
Add Comment
Please, Sign In to add comment