Need Help with Linux Scripting

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Can anyone give me any sites that would help me with this? Specifically, being able to add users to Linux, and setting their passwords, being read from a file. Our book proves to be pretty worthless, and I can't find any good sources.


Thanx in Advance to you Linux Boobs :D






KeyserSoze
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
What language did you want to write the script in?

assuming you have a file like:

name, passwd
name, passwd
name, passwd
etc....


you could do somthing like this in perl:

open (FILE, "passwdfile");
@lines = <FILE>;
foreach $line(@lines){
@temp = split /,/, $line
system("adduser $temp[0]");
system("passwd $temp[0] $temp[1]");
}


I doubt that would actually work, but you could do something similar.