Guest User

Untitled

a guest
Jul 14th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. vps:~# nano -w test.sh
  2. vps:~# nano -w userlist.txt
  3. vps:~# ls -la | grep test
  4. -rw-r--r-- 1 root root 7218 2009-09-27 14:44 test.sh
  5. vps:~# chmod +x test.sh
  6. vps:~# ./test.sh -h
  7. HELP SECTION FOR ADDING USER SCRIPT
  8. ----------------------------------------------------------------------------
  9. This script is made to read details from a file regarding user
  10. accounts and to create those accounts as appropriate.
  11. ----------------------------------------------------------------------------
  12. Only the root/administrative user, or user with administrative
  13. rights may use this script.
  14. ----------------------------------------------------------------------------
  15. The file that it reads from, 'userlist.txt', should exist. If that file
  16. does not exist (in the same directory), or is empty, there is no
  17. purpose for this script and it will not proceed.
  18. ----------------------------------------------------------------------------
  19. The structure of userlist.txt should be as follows:
  20. username:password:groupname:fullname
  21. Please do not use any spaces. No fields may be left blank.
  22. Any users with blank/invalid data will be skipped.
  23. ----------------------------------------------------------------------------
  24. Logs are stored in a file in the same directory called 'report.log'.
  25. If this file does not exist, it will be created.
  26. ----------------------------------------------------------------------------
  27. vps:~#
Add Comment
Please, Sign In to add comment