[Inschool] Scripts

Rusty Yonkers inschool@kalamazoolinux.org
Mon, 21 Jul 2003 09:22:58 -0700 (PDT)


Well here is a quick and dirty sample (I tend to like screen output
while the script is running so you can simplify it by removing the
echos) using just the first name for the userid.

#!/bin/bash
clear
echo "Preparing to add users to system"
useradd -p password -c "Dorian Gray" -d /home/students/dorian dorian
useradd -p password -c "John Wayne" -d /home/students/john john
.
.
.
.

echo "Users are added"

The only thing about this is that the userid has to be at the end. I
am not sure how you would read in the file from the script and get it
to parse the file into fields for the script to use.  


> 
> userid  password "user real name" "/home/students/"userid


=====
Rusty Yonkers
CNE, MCP, A+, CCNA, Linux+, Server+, Network+ certified
-----------------------------------------
Department of Redundancy Department
-----------------------------------------
Devoted RedHat fan... looking for penguin domination

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com