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
SWAC-GET(1)						      General Commands Manual						       SWAC-GET(1)

NAME
swac-get - audio collections of words (SWAC) manager SYNOPSIS
swac-get [-t] [clear] [update] | [upgrade] | [select <url|packid>] | [deselect <url|packid>] | [list] | [list-sources] | [list-available] | [sql <query>] | [--help] | [--version] DESCRIPTION
Swac-get is a simple command line program which allows to download and install audio collections of words (SWAC) in a SQLite3 database. Audio collections can be imported from the hard drive or directly from the Internet using the HTTP protocol. Swac-get is designed to be used with swac-explore, a GTK+ interface which allows the browsing of the created SQLite3 database. An important set of free audio collec- tions of words (SWAC) is available at: http://swac-collections.org/ For more information, please, visit the Shtooka Project homepage at: http://shtooka.net/ . COMMANDS
clear clear database deselect <url|packid> delete records of the package <url|packid> from the database list list installed packages list-available list available packages list-sources list source repositories sql <query> execute a sql query in the database select <url|packid> insert records of the package <url|packid> in the database ex: swac-get select file:///home/<my directory>/ swac-get select http://packs.shtooka.net/<my package>/ogg/ swac-get select fra-balm-voc select source-delete <url> delete <url> from the repositories list source-deselect <url> deselect <url> from the repositories list source-select <url> add <url> to the repositories list ex: swac-get source-select http://packs.shtooka.net/ swac-get source-select file:///home/<my directory>/ update update the list of available packages upgrade upgrade installed packages OPTIONS
-t, --target <path> set the SQLite3 database path (default path is ~/.swac/swac.db) -v, --version print version information and exit -h, --help print this help and exit EXAMPLES
swac-get source-select http://packs.shtooka.net/ swac-get update swac-get select chi-balm-hsk1 swac-get select fra-balm-voc BUGS
swac-get doesn't care about the version number for the upgrade command. AUTHOR
swac-get and this manual page were written by Nicolas Vion <nico@picapo.net>. mai 25, 2008 SWAC-GET(1)
All times are GMT -4. The time now is 03:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy