automatic registration with prosodyctl

435 views
Skip to first unread message

Administrator YouLooker

unread,
Jan 23, 2011, 10:05:01 PM1/23/11
to prosod...@googlegroups.com
Hi all,

As far as I can see, prosodyctl seems to be the way to register an account for a user and create a password for them.

So the question is, how can I have a script/program call prosodyctl to automatically register a user?

Note that this script/program is being executed by Apache and will therefore be running as the Apache user, i.e. www-data.

I thought of one way to do it... assume this is a C program being executed by Apache. If the C program which was owned
by root had the setuid bits on, then I could call system( "prosodyctl register user server password" ) and it would work
correctly? (Note I tried this and it worked), the only problem was that the .dat file created for the user in /var/lib/prosody/...
had root as the owner and group. A simple call to sytem( "chown prosody /var/lib/prosody..." ) would do the trick though.

Is this too complex (and unsecure)? Is there a better and simpler way to do it?

-Doug

1of16

unread,
Jan 28, 2011, 10:07:51 AM1/28/11
to Prosody IM Users
have you tried to use mod_auth_external (http://groups.google.com/
group/prosody-users/browse_thread/thread/
28908a4950d2d2e7/174d2fba2b76377e#174d2fba2b76377e)?
so you could add your users e.g. with a simple php-script and they can
auth against your mysql table.

On 24 Jan., 04:05, Administrator YouLooker <youlooker....@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages