Hello Paul, hello all,

Paul: The reason why I do NOT want vadduser or any commandline tool is
that I want to write a perl script which automatize user generation.

Cool would would be If one could run:
vadduser $variable_password
or something like this in
Perl or PHP code!


Oliver Etzel
> Oliver Etzel - GoodnGo.COM \(R\) writes:
> > I want to create new users like [EMAIL PROTECTED] NOT with vadduser
> >  BUT with just inserting it via mysql-insert into the vpopmail
> > database.
> OK, you have now explained what you want to use instead.  Somebody
> pointed out that the maildir will be created automatically by
> if the user exists (I hadn't realized it did that until I read that
> message and looked at the code just now) so you can get away with
> that.  What you have yet to explain is any valid or sensible reason
> you want to do this.
> > Any hints,
> > how I can generate the encrypted password in the column pw_passwd
> > (looks like this $1$S/TPu$GjMMj7yMJqG.0ckx) ???????
> Not without breaking out of MySQL and returning to the shell.  The
> hard way is to get a shell prompt, use passwd to set the password of
> dummy system user then copy the crypted password into the MySQL
> The harder way is to write a perl script that generates some good
> salt, calls crypt to crypt the password then uses the DBD modules to
> insert the user into MySQL.  An easy way to do it is to add the
> user with MySQL giving garbage for the crypted password then use
> to set a valid crypted password.  The very easy way to do it is to
> vadduser.
> You CANNOT do it all from MySQL.  You CAN do it all with vadduser.
> is more, I can see no reason why you would want to add a user but
> have the maildir created at the same time, which is all you could
> if you could do it all from MySQL  If you have some automation tool
> that can only cope with adding MySQL rows then you'll still have to
> modify it to shell out to generate the crypted password, so you
> as well modify it to shell out and run vadduser anyway.  If you want
> domain admins to be able to add users this way because they cannot
> vadduser you'll still have to write code that validates they can
> modify their own domains, so you'd be far better off installing
> like qmailadmin on your server.
> -- 
> Paul Allen
> Softflare Support

Reply via email to