LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-07-2003, 06:14 AM   #1
RKris
Member
 
Registered: May 2002
Location: UK
Distribution: Mandriva linux
Posts: 152

Rep: Reputation: 15
Adding lot of users??


Hi,
I have a file in which I have login name and password separated by a tab.

Now how can I add these users to the system? Can anyone provide me a shell script to do it?

regards
Krishna
 
Old 05-07-2003, 07:56 AM   #2
llama_meme
Member
 
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
You could knock up something with awk...I might write an example for you in an hour or two.

Alex
 
Old 05-07-2003, 08:05 AM   #3
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
There is a command `newusers' that reads from a file and add users ...
 
Old 05-07-2003, 12:55 PM   #4
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
Just a thought: you could easy write a >very simple c program with lots of
system("useradd <username> && echo <passwd> | passwd <username> --stdin");
Definatly ugly and not the way to go but very fast as you can just copy & paste the lot in the c file, but still very ugly
 
Old 05-08-2003, 12:36 AM   #5
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
use for loop inside a shell script
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding users Abbaddon Linux - Newbie 7 09-01-2004 04:30 AM
adding users tommytomato Linux - Newbie 15 09-01-2004 02:37 AM
Adding Users Obie Linux - Security 4 06-28-2004 04:52 PM
A lot of users!?? FreakboY Linux - Newbie 1 10-13-2002 03:36 PM
adding Users hextex Linux - Newbie 5 06-08-2001 03:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:51 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