LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-09-2002, 03:23 PM   #1
ricardocastro
LQ Newbie
 
Registered: Feb 2002
Location: Ensenada Mexico
Distribution: WinNt and RedHat
Posts: 7

Rep: Reputation: 0
Unhappy Adding many users?


Hi!
My name is Ricardo Castro and i'm complete newbie in the Linux use .
My office has decided to use Linux like its Operating System and we need to create and account for everyone; the little problem is that we're talking about 800 people!
Is there anyway to create them without the need to do it one by one?
Is there any script available? (he have 4 groups of work)

Thank's!
:
 
Old 02-12-2002, 09:00 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
not sure of any programs or scripts but most of the time you have to add them one by one.. or if you have a list.. you can create the passwd file and add them that way.. but it would take just as long in going thru the steps to manually add them as you would have to create their home dir's too.. etc..

try doing a search on the web to see if any scripts are available.
 
Old 02-14-2002, 12:02 AM   #3
Malicious
Member
 
Registered: Jan 2002
Location: Galveston Island
Distribution: suse, redhat
Posts: 208

Rep: Reputation: 30
man useradd

The useradd command can be used in a shell script to add the users. You will still have to type in the user names, but here is a very simple script.

#!/bin/bash
usernames="tom dick harry"
for name in $usernames
do
useradd -d /home/$username -g users -s /bin/bash $username
done
#end of script

This script will add users tom, dick and harry with home directories at /home/tom, /home/dick and /home/harry respectively. They will all be members of group "users" and will get the bash shell on login.
 
Old 02-14-2002, 01:17 PM   #4
kervin
Member
 
Registered: Jan 2002
Location: Melbourne, FL.
Distribution: redhat
Posts: 168

Rep: Reputation: 31
ricardo,

check freshmeat, http://freshmeat.net/

A quick search brings up quite a few hits.
http://freshmeat.net/search/?q=user+...tion=trove_cat

createusers looks good, http://freshmeat.net/projects/createusers/

good luck.

PS. on a side note I'd recommend that you use a Central user database like LDAP or Kerberos as your nameservice. This will allow you to administer all your users in a central location. Check out http://linuxdoc.org/ for more info.
 
Old 02-19-2002, 01:22 PM   #5
ricardocastro
LQ Newbie
 
Registered: Feb 2002
Location: Ensenada Mexico
Distribution: WinNt and RedHat
Posts: 7

Original Poster
Rep: Reputation: 0
Talking

It's really works!!!

Thanks to all; the program createusers in freshman allow me to active all accounts.


Thank's to all!!

Sincerely

Ricardo

 
  


Reply



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
adding new users Brian Du Preez Linux - Newbie 1 10-04-2005 12:33 PM
Adding New Users guygriffiths Linux - General 4 10-13-2003 10:11 AM
Adding new users Fried Linux - Newbie 4 09-24-2001 10:37 AM
Adding users... philfighter Linux - General 3 07-23-2001 10:48 PM
adding Users hextex Linux - Newbie 5 06-08-2001 03:54 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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