script file which will automatically create accounts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script file which will automatically create accounts
# 1  
Old 02-09-2011
script file which will automatically create accounts

How tocreate a script file which will automatically create accounts from a csv file
# 2  
Old 02-09-2011
Whats called accounts here? Please elaborate your requirement.
# 3  
Old 02-09-2011
Something like this, if you have a utility called useradd (can also be adduser or something different) on your system...
Code:
while IFS=, read var1 var2 var3....
do
   useradd bla bla bla  "$var1" ...
done < csv-file

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Opening a file in vi and automatically save and quit this file using shell script

Hi friends, In my shell script, I want to open a file using vi editor. After opening the file in vi, I want to save and quit this file automatically.... all through shell script. the code segment is: ------------------------------------------------------------ cd ~/netfpga/projects/scone/sw/... (2 Replies)
Discussion started by: sachinteotia
2 Replies

2. Shell Programming and Scripting

Retrieve multiple rows from mysql and automatically create a table

Hi, i want to create a table automatically based on another table (sms_key). For example; If user create a new row with sms_keyword field: IRC then a table created automatically (with some field on it, like: name, ph_number, messages). select * from sms_key; +-------------+ |... (1 Reply)
Discussion started by: jazzyzha
1 Replies

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

4. Shell Programming and Scripting

How to automatically create variables from user input in ksh?

I need some help to write a ksh script. My code so far (pretty bad, sorry): #! /bin/ksh echo "Calculate average" UserDecision=y while test $UserDecision = y do echo "Enter a number: " read Number1 echo "Enter a number: " read Number2 echo "Do you want to enter another number?... (2 Replies)
Discussion started by: johnagar
2 Replies

5. Linux

how to automatically create a file?

how can i automatically create a file on Linux? like a process that searches for the file and if the file does not exist, it automatically makes the file (3 Replies)
Discussion started by: roozis
3 Replies

6. Solaris

Requesting help to automatically create home dir on login

I know we would not normally do this. However, I would like to have user's home directory created when they log in the first time. I have searched the forums and have not found any help yet. Scenario - environment uses NIS for auth and usually NFS mount HOME. However, I have a pilot environment... (4 Replies)
Discussion started by: 22blaze
4 Replies

7. Shell Programming and Scripting

automatically create password and expand it to other servers

I´m a new system administrator. I have to create a script to put in crontab to change periodically root password and didtribute it to other servers. I searched the posted threads but I didn't find my answer. I would like to do this using ssh and trusted keys. Can anyone help me? Thanks. Aldina (0 Replies)
Discussion started by: Alrica
0 Replies

8. Shell Programming and Scripting

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 ... (1 Reply)
Discussion started by: rksubash
1 Replies

9. Shell Programming and Scripting

How to create cron job automatically?

How do I write a perl script to get the cron jobs? I could do a perl -e ' system "crontab -l > jobs.txt " '; Is there a better way? Then I can use perl to make changes to jobs.txt. How can I submit the changes. I suppose I could use system "crontab jobs.txt", is there a better way? ... (0 Replies)
Discussion started by: siegfried
0 Replies

10. UNIX for Advanced & Expert Users

Hw to create root-equivalent accounts?

Hi all. After installing ssh on a server, i'd like to create a user with root privileges. My problem is that after creating a user rootssh (uid=0, gid=20, /home/rootshh), i make rootssh's ssh keys. The problem is that normally the ssh-keygen should create the keys under $HOME/.ssh/, and actually... (6 Replies)
Discussion started by: penguin-friend
6 Replies
Login or Register to Ask a Question