User Creation Bash
Ok i need to make a script for class that creats users and groups in a script.
so i made a text file called employ.txt looks something like this: John Doe jdoe IT Mary Lamb mlamb Account So, i need to make a script that creates the users jdoe, and mlamb using bash, and assigning them to there groups IT, or Account. anyone got any help or know a website i could look at one for some ideas? |
What kind of a class are we talking about? eg Have you had some basic instruction in scripts?
Go to tldp.org and get "Bash Guide for Beginners" by Machtelt Garrels. Also there is something called Advanced BASH Scripting Guide (or something like that) |
class
its a linux system admin class and there really is no instructions, jus go out and find out how to do it.
this is what i got so far but it add everything in the text as users. i need to know were to put the awk for only the third field for users and awk user -g to assign them to the right groups. #!/bin/sh for i in `more employ.txt ` do echo $i adduser $i done |
All times are GMT -5. The time now is 05:31 PM. |