Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
05-20-2014, 10:39 AM #1
- Join Date
- May 2014
- Thanked 0 Times in 0 Posts
bashl script to add new users taking info from a txt file
First of all,congrat for the forum, it's a really valuable resource for a lot a people, including me.
I don't know if this is the right place where to ask this, my question is about my homework, I'm a bit confused with an exercise, so if anybody can point me in the right direction (Or give me the answer) I'll be really gratefull:
Given a text file called users.txt with this info inside:
The script should create an user using the first word of each line, the second word of each line will be used as password, and the third one as the home directory.
I can only use awk or shellscripting for the exercise. The teacher pointed that one of the posible solutions includes the SYSTEM command used inside AWK...but there are other solutions using only shellscripting
I've tried to do it using USERADD command, creating a loop with a "for" etc...but nothing at the moment
Thanks for your help