
stevenj0728
New User
Dec 9, 2012, 7:53 AM
Post #1 of 5
(2188 views)
|
Creating Users/Groups
|
Can't Post
|
|
I running into a block with a script that i need to create. I need to create a user or a group. The problem is that if the user prompted for the tasks in a menu based options and they pick user first, I need to also have them specify a group, but what if one isnt created? How can I redirect them to create a group while making a user? I am using this to start out with: print "\n Maintenance Tasks Menu \n 1 - Create UNIX Group 2 - Drop UNIX Group 3 - Create User 4 - Drop User \n Please enter the task number you wish execute \n" ; Then I plan on using a case statement for these options. I also what to throw in a loop here, I believe, so that if I user inputs another value than 1,2,3,or 4 it will throw them back into the menu to choose again. I have this for my else statement, but not sure how to continue the script when its complete. else { print "Invalid task number, please try again\n"; }
|