CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Creating a new mail account only script.

 



patk
Deleted

Oct 23, 2000, 9:02 PM

Post #1 of 2 (701 views)
Creating a new mail account only script. Can't Post

I am trying to create a script that creates a new email account on my domain.

The passwd is in this format:
user:*:1924:281::/home/user:/bin/emailonly

I cannot open /bin/emailonly so I don't know what I can do. base on the info, i wrote this:
=========================
#!/bin/perl

## Password file.
$data = "/etc/passwd";


## Variables for new account.
$user = "popplets";
$pass = "Bobdole1";


open(FILE,">>$data");
print FILE "\n ";
close(FILE);

mkdir("/home/$user/", 0755);

print "Content-type:text/html\n\n";
print "The account for $user has been created.";
exit;
==================================
is there a way to not use etc/passwd??
I'm running on linux 2.0


patk
Deleted

Oct 23, 2000, 9:05 PM

Post #2 of 2 (701 views)
Re: Creating a new mail account only script. [In reply to] Can't Post

whoops::
print FILE "$user:*:1924:281::/home/$user:/bin/emailonly\n ";

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives