LinuxQuestions.org
Review your favorite Linux distribution.
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-20-2009, 08:47 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Rep: Reputation: 102Reputation: 102
Question add more than one user in one go ??


Hi all,

Is there any command or switch option with "useradd" command to add more than one user in a single command.

I can do this with help of a small script, just wondering if there is any other way out.

Regards,
VIKAS
 
Old 01-20-2009, 09:15 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,641

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
There is a command to do this. Take a look at
Code:
man newusers
 
Old 01-20-2009, 02:51 PM   #3
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by vikas027 View Post
Hi all,

Is there any command or switch option with "useradd" command to add more than one user in a single command.

I can do this with help of a small script, just wondering if there is any other way out.

Regards,
VIKAS
Or you can have some fun and create a batch script that will take a file and run the useradd command and supply all the command the information for the file.
 
Old 03-12-2009, 01:10 AM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Original Poster
Rep: Reputation: 102Reputation: 102
Hi,

I will prefer working with a shell script than using newusers command.

Thanks bathory
 
  


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
Can't add local system user - useradd keeps saying user already exists ADeluiz Linux - Security 5 07-26-2013 03:17 PM
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
samba - add user script - User account does not exist itzamecwp Linux - Server 2 01-18-2007 10:52 PM
How to automatically add smb user when unix user added Winanjaya Linux - Newbie 3 01-07-2007 11:17 AM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM


All times are GMT -5. The time now is 07:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration