Any linux scripting people here?

Associate
Joined
19 Mar 2005
Posts
569
Can anyone help me with writing a script to read the list of names below and then creating a user account for everyone on the list and giving them a home directory and the username the same as there surname?

I am really struggling do i use newuser I dont know how to read in files either, if anyone could help me it would be most appreciated.

Code:
Aird  
Barron 
Chin   
Cunliffe   
Done  
James   
Lynam     
Mountford   
Pelteki     
Revell
Stevenson    
Symonds
 
Code:
 [font=Arial]#!/bin/sh[/font]

  [font=Arial]echo "Enter the filename of names: "[/font]

  [font=Arial]read file1[/font]

newusers $file1
[font=Arial][/font]

Does this actually work and how do I set the home directory, I am not on a linux machine at the minute so cannot test it. I dont think it is corrrect :mad:. What would be the pseudo code?
 
Back
Top Bottom