Need a Shell script to create Multiple User Accounts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need a Shell script to create Multiple User Accounts
# 1  
Old 06-14-2008
Need a Shell script to create Multiple User Accounts

Hi All,
Am New to shell scripting , Can u please Help me to Create a shell script which Creates Multiple Users (say up to 250 users) ,am using Rehat server 5 enterprise Edition .. I am really in need of this script So tat i can save time and effort for this Job ..
KIndly help me Please ...
# 2  
Old 06-14-2008
0. That kind of script exists in many forms and all over the 'net. You might want to brush up on your search-fu.
1. Secondly, if you really want to save time, you should read up on basic scripting like BASH Programming - Introduction HOW-TO and http://www.tldp.org/LDP/Bash-Beginne...tml/index.html.
2. The basic pseudo-code layout for your script in bash could look like:
Code:
#shebang line
input | while read line; do
 [ necessity ] && separateLineItems
 [ getent ] || { accountExists; break; }
 performCommand || log error
done
exit gracefully

3. Fill in the pseudocode if you can, in any case post the complete and valid command line to create a user named "user" for your system, and if those users have their unique home and group created as well, and if those users are part of any other groups, and how your users will be delivered to you (free text, comma or tab-separated, etc).
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script To Delete User Accounts On Multiple Servers

Hello All, The servers in question are AIX/Unix servers. I was hoping to find a scripting solution where I could use one server as a jump server and run a script that would check each server for a user account (the source file for the user accounts would be a text file or csv file) , and delete... (4 Replies)
Discussion started by: k45bryant
4 Replies

2. Shell Programming and Scripting

How to change passwords for User accounts on multiple UNIX/Linux machines remotely?

Hello Experts, Need some direction on creating shell script for following environment: We have about 20 people in the team working as Oracle DBA's (sysdba's and appdba's). Total Servers which is a mix of Unix and Linux are 200. We do not have Root user access on any of the servers and... (3 Replies)
Discussion started by: sha2402
3 Replies

3. Shell Programming and Scripting

Need help to create multiple file using shell script

HI, i created the below script to create the multiple files, iam not getting the required output, Please advice. #!/bin/sh v_date=$1 # argument will come as daymonthyear eg : 151112 v_day=`echo $v_date | cut -c 1-2` v_mon=`echo $v_date | cut -c 3-4` v_year=`echo $v_date | cut -c 5-6`... (4 Replies)
Discussion started by: jagguvarma
4 Replies

4. Shell Programming and Scripting

New To UNIX - Need Script to create report of user & group accounts

Hi, I'm new to the world of UNIX and have been asked to create a complex script (at least complex to me:confused:) for AIX UNIX to create a report of all the users on the server including server, user, UID, groups, GID, etc. Found a script using lsuser, but the output is still lacking. 2 things I... (2 Replies)
Discussion started by: panthur
2 Replies

5. Shell Programming and Scripting

create an array which can store the strings from the user input in shell script

I want to create an array which can store the strings from the user input in shell script . example :- I want to store the 5 fruits name in a single array which the user provides . (1 Reply)
Discussion started by: Pkast
1 Replies

6. Shell Programming and Scripting

Shell script to create multiple OpenSSL Certificates

I need to create a script that will generate a bunch of OpenSSL Certificates signed by my own CA. The certificates being generated are for testing purposes only. But what I need is the following Root CA 512 768 1024 1280 1536 1792 2048 4096 I need basically 64 combinations. Each... (4 Replies)
Discussion started by: krisarmstrong
4 Replies

7. Shell Programming and Scripting

script file which will automatically create accounts

How tocreate a script file which will automatically create accounts from a csv file (2 Replies)
Discussion started by: donegal92
2 Replies

8. Shell Programming and Scripting

Create new user account and password in shell script

I am trying to create a shell script that will: check if a specific user already exists if not, create a specific group and create the user in that group assign a password to that user, where the password is passed in as a parameter to the script The problem that I need help with is 3 on... (4 Replies)
Discussion started by: killuane
4 Replies

9. Filesystems, Disks and Memory

script to create multiple instances of a user account across LPAR's

My company has about 40 databases with each database in a different logical partition. Presently the SysAdmin person says it is necessary to create a user profile (login and password for each instance of databases on each LPAR. 1. Is it necessary that the user must be created in each LPAR? 2.... (1 Reply)
Discussion started by: kcampbell
1 Replies
Login or Register to Ask a Question