Solved

PERL QUESTION

Posted on 2004-03-26
2
138 Views
Last Modified: 2010-04-06
hELLO EVERYONE :)
i was wondering if anyone knows how to create a perl script that reads in user information from a text file (the text file can only consist of First name, last name and email address) and creates a user account using first initial of first name and the last name and also create a generic password.  after that is done, it will then email the user their username and password.
0
Comment
Question by:ghjs
2 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10687135
read file

http://www.devdaily.com/perl/edu/articles/pl010002.shtml

and to send mail

http://perl.about.com/library/weekly/aa022000a.htm

I dont think you can create a user from perl
0
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 500 total points
ID: 10690095

You can create a user by executing shell command like...

$username = testaccount;
$passwd = testaccount;
$output = `useradd $username -p $passwd`;

http://linux.about.com/library/cmd/blcmdl8_adduser.htm

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now