Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-02-2003, 08:55 AM   #1
LQ Newbie
Registered: Sep 2003
Location: NZ
Posts: 3

Rep: Reputation: 0
Question How to use bash shell to create many users

How to use bash shell to create many users

Hi all, my name is Rick. Iˇ¦m using red hat 9.0
Can somebody show me how to add many accounts by a bash script?

I need to perform the following functions:
1) I have a file called userfile.txt. It contains new usersˇ¦ information. The format is like this:
Username1assword:groupname:username1 surname1
e.g. Mike:1234:IT:Mike White
John:5732:Accounting:John Smith

2) I now need to create a shell script calledˇXmyscript , this script program will read the userfile.txt file and process the user account.
„X To use this program, user must type this command: ˇ§myscript userfile.txtˇ¨. If user does not type in this way, system will display the error messageˇXˇ§you type in wrong way !ˇ¨
„X If people type in myscript ˇVh, system will display some information to the users.
Old 09-05-2003, 12:14 AM   #2
Registered: Apr 2002
Location: Los Gatos, CA
Distribution: boring redhat 9
Posts: 163

Rep: Reputation: 30
You'll have to edit it a bit, but this should help.


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
create new users in squirellmail bharath144 Linux - Software 1 11-26-2005 04:02 PM
Can't create users! Zeke55 Linux - Newbie 9 12-08-2004 02:23 PM
create users using script polis Linux - General 1 05-18-2004 09:19 AM
How to use bash shell to create many users Linx2003 Programming 7 09-02-2003 02:00 PM
How to use bash shell to create many users Linx2003 Linux - General 1 09-02-2003 09:18 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 PM.

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