Script Idea/Question

I dont think this can be done but i kinda wanted some guidence on how i should go about doing this. Basicly im giving users a change to add an email account. Lately i have been doing it manually. Now i want to automate the process. But im not sure php can actually do an “adduser” command. I have checked online and i didnt see much other then doing a mysql database, which i have no problem doing but how would a user get email that way? Please help. Thanks

-Prophit

HUH?

I am confused as to what you are even asking. I will be happy to help (if I can) but you must express CLEARLY what it is you are trying to do?

I presume you meant a CHANCE to add an email address. however, what are you trying to add it to? (This would be important information).

I don’t even know where you are going with the “adduser” thing and the MySQL sending email…

If you can clarify what exactly you are looking to do, then we can help you better.

So basicly im trying to do an system adduser, for domain email accounts. like in lunix its the adduser command. I have a group setup with permittions and no shell access so all they would get is email access. For example ie

A user registers for my page. I want them to have an email account added. The only way i see doing this is by doing a system command of adduser. Unless there is any other way??
So if i register the userid prophit it will add it to a database ie prophit, ( i have that part done) then create a user id on the system of that name (prophit)
Then that user will now have the email account of [email protected].
That better?

That is much better (for me anyway).

You are trying to add a system user on LINUX (or similar O/S) and the added user will only have email access (essentially), Correct?

Well in linux, you can write a bash (or other shell) script that can automate the process. You just pass it the appropriate variables.

You can have PHP access that script one of a couple ways. You can use the SHELL_EXEC() function or you can just use the actual command to launch the script directly from PHP, you just need to enclose the command with the back tick ` operator (That is not an apostrophe, it’s the back tick the one below the tilde ~ )

For example
[php]
adduser prophit -p password
[/php]

Just ensure that the Webserver UID has permissions to access the script.

Sponsor our Newsletter | Privacy Policy | Terms of Service