I am trying creat a script that allows me to add user to a certain staion. Here are the requirements.
1. Log in as root(no prblem there)
2. cd to cd/etc (directory)
3. co -l passwd (checks out and locks the passwd file for revision control)
5. vi passwd(edits the file)
6. / next(Search for the word next)
7. yy p(This copy the line)
8. Then I edit the original line.(the username should be first 7 characters of the last name and the first character of the first name.
9. Save and exit the passwd file.
10. ci -u passwd(checks in and unlocks the passwd file)
11. Be able to log how use the file last
12. mkdir username(make a dir with the new user name)
13. chmod username(change the permission of the users home directory)
14. cd /home/users/username(this changes directory to the users home directory)
15. ./home/users/(this part has to beable to setup the user enviroment(this creates the users enviroment)
16. pwconv( this adds the new users form the /etc/passwd file to the /etc/shadow file so that the passwd can be created.)
17. passwd username (changes the user password)
18. create a file that copies the passwd and the shadow files to different unix servers.
How can I do all of this? I think the process is too long? Help me.
I pretty new at this so please try to explain with as much details as you can. The simpler you can make this for me the better. Because I am a new kid on the block when it comes to unix. Is there any way I can do the following task in a menu driven format? For example; when I log is as root, I can type the name of a script to run, then it would ask me to add a user, the user name, the dir name, and such and such. Then send the user infor to the other unix stations.