Sponsored Content
Top Forums Shell Programming and Scripting Need a Shell script to create Multiple User Accounts Post 302205310 by unSpawn on Saturday 14th of June 2008 08:15:07 AM
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).
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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

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

7. 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

8. 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

9. 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
LDP(7)							 Miscellaneous Information Manual						    LDP(7)

NAME
LDP - Intro to the Linux Documentation Project, with help, guides and documents SYNOPSIS
The Linux Documentation Project (LDP) provides a variety of free documentation resources including guides, FAQs, HOWTOs, and man-pages to the Linux community. AUTHORS
The various documents in the LDP archives are maintained by individual authors, and are listed in the beginning of each HOWTO. If you have any questions or inputs to a document we encourage you to contact the authors directly. WEB PAGES
The LDP has its own dedicated web site as do many of the various translations projects which are linked from the main LDP web site at: http://www.tldp.org/ MAN PAGES
A web page with status information for manual pages and translations is found at: http://www.win.tue.nl/~aeb/linux/man/ MAILING LISTS
LDP has a number of mailing lists, such as <announce@en.tlpd.org> Announcements from the LDP project <discuss@en.tldp.org> General discussion on the LDP project <docbook@en.tldp.org> Questions about the use of DocBook For subscription information, see the website. If you are interested in DocBook beyond the simple markup of your LDP document, you may want to consider joining one of the OASIS DocBook mailing lists. Please see http://docbook.org/mailinglist/index.html for more information. FILES
Most distributions include the HOWTOs and mini-HOWTOs in the installation /usr/doc/ (old place for documentation) /usr/share/doc/ (new place for documentation) /usr/share/doc/HOWTO/ (HOWTO files) /usr/share/doc/HOWTO/mini/ (mini-HOWTO files) SEE ALSO
info(1), man(1), xman(1x) info pages as read with emacs(1) or info(1) LDP
2001-11-15 LDP(7)
All times are GMT -4. The time now is 05:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy