[K12OSN] Add users from file

Jim Hays haysja at sages.us
Wed Jun 9 14:34:54 UTC 2004


If you have webmin installed, you can do this through a webmin 
interface.  I did it just yesterday.


daniel.hunt at iibbank.ie wrote:

>No need to bother, the addusers command takes care of this as far as I know!
>
>I know the man pages said something about adding multiple users from a
>textfile
>
>check it out!
>
>Daniel
>
>-----Original Message-----
>From: cliebow at downeast.net [mailto:cliebow at downeast.net]
>Sent: 09 June 2004 15:02
>To: Support list for opensource software in schools.
>Subject: Re: [K12OSN] Add users from file
>
>
>here is a little piece of script you can adapt
>
>
>2004.csv the script reads
>Brian,Austin,2004,Pa55word,baustin
>Colin,Barry,2004,Pa55word,cbarry
>Matthew,Becker,2004,Pa55word,mbecker
>Nicole,Bickford,2004,Pa55word,nbickfor
>################################################################
>
>
>
>#################################################
>
>cat 2004.csv | while read line; do
>first=$(echo $line | cut -f1 -d ',')
>last=$(echo $line | cut -f2 -d ',')
>year=$(echo $line  | cut -f3 -d ',')
>password=$(echo $line | cut -f4 -d ',')
>name=$(echo $line | cut -f5 -d ',')
>stustaff=$(echo $line | cut -f6 -d ',')
> #ADD Students OR Staff TO CSV
>
>  
>
>>Does someone know of a script which takes names from a file and automakes
>>    
>>
>u> sername?
>  
>
>>I have a file with 300 names like so:
>>
>>John,Smith
>>
>>I want the script to go through the list and output another file like so:
>>
>>John Smith,johsm (for example)... Alternatively an output which can be fed
>>into the adduser batch in webmin.
>>
>>Anybody seed something like this?
>>
>>Regards
>>Trond Mæhlum
>>
>>    
>>
>
>
>
>---------------------------------------------
>This message was sent from Downeast.Net.
>http://ellsworthme.com/
>
>
>
>_______________________________________________
>K12OSN mailing list
>K12OSN at redhat.com
>https://www.redhat.com/mailman/listinfo/k12osn
>For more info see <http://www.k12os.org>
>
>
>======================================================
>This email and any attached files are confidential and may
>be legally privileged. It is intended solely for the addressee. 
>Access to this email by anyone else is unauthorised. 
>If you are not the addressee, any disclosure, reproduction,
>copying, distribution, or other dissemination or use of this 
>communication is strictly prohibited. If you have received 
>this transmission in error please notify the sender immediately 
>by telephone at ++353 1 6035800 or email emailadmin at iibbank.ie 
>and then delete this email.
>Email transmission cannot be guaranteed to be secure or error free 
>as information could be intercepted, corrupted, lost, destroyed, 
>arrive late or incomplete, or contain viruses.The sender therefore 
>does not accept liability for any errors or omissions in the contents 
>of this message, and shall have no liability for any loss or damage
>suffered by the user, which arise as a result of email transmission.  
>If verification is required please request a hard copy version.
>
>
>_______________________________________________
>K12OSN mailing list
>K12OSN at redhat.com
>https://www.redhat.com/mailman/listinfo/k12osn
>For more info see <http://www.k12os.org>
>
>
>  
>





More information about the K12OSN mailing list