On Sat, 13 Apr 2002, CEPi wrote:
Greetings people, So here we go the assignment in full :
- Write the AUFF (Add User From File) script.
- This script should take a filename as a command line parameter.
- This file should contain all of the "standard" options for the add user
command. 4. You get to decide the format. 5. You get to document the script. 6. You get to write a "man" document supporting your script. 7. Submit a printout of the script, a test file, and your "man" document. 8. Implementing any advanced parsing features will earn you bonus points. (optional)
Sorry for the long list and any help or suggestions greatly appreciated.
Why reinvent the wheel? if you are allowed to use what ever format for the file you want just user the existing /etc/passwd format the script could be as simple as
adduserscript newuser
#!/usr/bash cat /etc/passwd $1 > tmp_file mv tmp_file /etc/passwd #this will create the user with all except the creating of the home area #which I will leave as an excersise for the reader, but you can parse #the file with awk to get the location out, then just mkdir what that #is.
I'm back to College now in Ipswich and again as always if someone needs some Linux ISO's and lacks a broadband conn. I am more then happy to burn some fresh ones for any user in the group (for free of course:). I will try to make some of our meetings as I do miss them :)
You poor sole :o)
thanks for your time and hope to see you all again later.
Np. Anything to avoid the work I should be doing!
D
Bamir.