LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create multiple accounts & SSH (https://www.linuxquestions.org/questions/linux-newbie-8/create-multiple-accounts-and-ssh-277384/)

guptawizard 01-13-2005 12:50 PM

Create multiple accounts & SSH
 
Hi all,

I need to create a (large!) number of new user accounts on an FTP server. I have a list of names and (initial) passwords. Can anyone tell me how to use this file as parameter input to a script to do the create (an example would be nice!)? I want these users NOT to have shell access.

Also, as we will be using SSH, is it possible to create the keys in the same manner if I create a file of passphrases? This is because we don't want the users to have any shell access.

Many thanks,

John.

david_ross 01-13-2005 01:25 PM

Welcome to LQ.

Creating a script like that should be fairly simple, can you post an example line from your input file and a list of the commands you would run manually to create the user accounts.

homestead1000 01-13-2005 01:27 PM

this is quick and simple.



#!/bin/bash

list=`cat /root/personList`;

for item in $list;
do
useradd $item;
done


All times are GMT -5. The time now is 02:48 AM.