adding users

They have: 2 posts

Joined: Feb 2002

I hope someone can help me out here. Im running an email system on a website and when a user registers for an account, I want to be able to add them automatically. Right now I need to add them in manually. Im running on a linux machine with apache/php/perl/python. The problem is I have a program sitting in a certain directory with root permissions. I need to send 5 or 6 arguments to the program and write out the results. Ive tried executing ssh through php and sending the arguments that way, but i cant seem to change to root and/or change to the directory and run the program. Im not too familiar with all the cpan modules for perl, so ive been trying to do this mostly through php. Does anyone have any ideas or know somewhere that might give me some info on this subject.

thanks

They have: 10 posts

Joined: Feb 2002

I seem to remember something by the name of SUID which allowed you to run programs as root or something along those lines. But that's pretty insecure as far as things go.

Now that I think of it, I know a program called sudo which executes single lines of code as root. Search for it on google and compile it, see if that works.

He has: 32 posts

Joined: Mar 1999

sudo is the way to go if you want to stick to sendmail.

On the other hand, Qmail offers the option to add users without actually creating a new unix-users, you might think about that as well...

later

http://www.patrickbaer.com
Professional Photo Retouching Services

They have: 10 posts

Joined: Feb 2002

Just an addition to patricks message. Qmail is a lot more secure than sendmail is. Sooo.. Smiling Either get used to downloading patches, or get Qmail.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.