LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2005, 01:50 PM   #1
guptawizard
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
Question 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.
 
Old 01-13-2005, 02:25 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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.
 
Old 01-13-2005, 02:27 PM   #3
homestead1000
Member
 
Registered: Jul 2003
Location: San Diego, CA USA
Distribution: RH 7x,8x,9x, RHE 3, Fedora Core1
Posts: 38

Rep: Reputation: 15
this is quick and simple.



#!/bin/bash

list=`cat /root/personList`;

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i create Dialin accounts? BRC Linux - Networking 1 06-08-2005 06:26 AM
Tightening shell accounts? SSH & RSync gian2oo1 Slackware 2 01-07-2005 03:15 PM
Login & then Out of Multiple Dialup Accounts VJD Linux - Software 2 11-12-2004 08:22 AM
Multiple LINUX OS's, same filesystem & accounts? yanger Linux - Distributions 1 06-28-2004 07:41 PM
How to create accounts muneebs123 Linux - Newbie 1 09-06-2003 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration