LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-21-2001, 05:03 PM   #1
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
script for creating multiple users


Being the penultimate lazy sysadmin I thought I'd ask here before I delve into writing a script. What I need is a script for adding multiple users using the "useradd" command. I'm going to be adding about 250 users but they will not all be going onto the same box. Some are going onto Solaris machines and some onto AIX machines. Besides I'd hate to have to use "SMIT" to manually add 250 users. I'm thinking of writing a script that will use "foreach" to loop through a file with the username and gecos field to create the entry in /etc/passwd and to use the UID 35000 as the base UID for all of the rest and increment from 35000 by 1 for each user added, then run the password program to create a temporary password for the user that expires when they login. Does someone already have something like this written? Would it be as easy as I've set out? I'm testing the draft of the script on a Linux box and would tune it for Solaris and AIX when I ported them over.
 
Old 08-21-2001, 05:22 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 10,318

Rep: Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612
You may want to check out usrmgr (http://www.crosswinds.net/~abpo/prog...r/e_index.html) or Createusers (http://www.lfsp.org/#createusers).
 
  


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
add multiple users(Script) amer_58 Programming 22 02-22-2013 09:09 AM
Creating multiple users in Kmail with a single KDE user jonole Linux - Software 3 10-03-2004 12:36 AM
[FC2]Why does the users command display multiple users? Harkov Fedora 1 07-10-2004 09:24 PM
bash script for adding multiple users pilipk01 Linux - Newbie 4 01-12-2004 10:05 PM
Creating users with a script 80s Linux - General 3 01-13-2003 12:35 AM


All times are GMT -5. The time now is 04:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration