On Wed, 23 Aug 2000, Leonardo Magallon wrote:
> Another solution is to write the command to vadduser in a file with the
> information from the user and then put a cron command to add the user , blank
> the file . This cron could run every minute.
> This a dirty fix.
> One problem I've been having is that my signup script can't know if an alias
> exists with the name the webuser is trying to add.
Dunno what language that script is written in, but all you need to tell it
to do is something like this:
GREP="/usr/bin/grep" # grep that supports w and q switches
echo -n 'enter desired username (2 - 10 characters) : '
read USERNAME
while ls -la ~alias | $GREP -wq $USERNAME ; do
echo "sorry, that username is already an alias"
echo -n 'please try another (2 - 10 characters) : '
read USERNAME
> [EMAIL PROTECTED] wrote:
>
> > Harsha-
> >
> > Like previously mentioned, it's a problem with permissions. Your web
> > server is probably running as the user "nobody" and you need root
> > permissions to add a user. The quickest and (somewhat) safe method to do
> > this is to get the package called "sudo" and give the user "nobody" rights
> > to run vadduser.
> >
> > -Andy
> > [EMAIL PROTECTED]
> >
> > [EMAIL PROTECTED] writes:
> >
> > > Hi,
> > >
> > > I have written a C program to create a s new user on a vpopmail domain,
> > > which is run from the command line. This works fine.
> > >
> > > Now I need to let a user signup himself by cliacking a link "Sign me up
> > > now". The sign up page has four text fields - UserID, password1, password2
> > > and the user's RealName. Up on submit the values are posted to a C progam
> > > (almost similar to the above mentioned) which takes the parameters
> > > correctly.
> > >
> > > But strangely in this case, the function vadduser fails to add the user to
> > > the specified domain. It should have worked. I could'nt figure out why its
> > > failing.
> > >
> > > The parameters are...
> > > vadduser(userid, domain, password, realname);
> > >
> > > Can any body tell me why??
> > >
> > > sincerely,
> > > Harsha
> > >
> > >
>
>
James Smallacombe PlantageNet, Inc. CEO and Janitor
[EMAIL PROTECTED] http://3.am
=========================================================================