Hello,
I've been trying to install ejabberd with pam authentication. I've been chasing one error after another. I must say, this is a pain in the butt.
I compiled everyting as described here:
http://www.ejabberd.im/pam
and
http://www.ejabberd.im/tuto-install-ejabberd
What I want, is that only local system users can log on to this jabber server, nobody can create an account, and new system accounts can automatically log on to jabber server with
I have finally managed to get the server running with the command:
su ejabberd -c "erl -pa /var/lib/ejabberd/ebin -sname ejabberd -s ejabberd -ejabberd config '\"/etc/ejabberd/ejabberd.cfg\"' log_path '\"/var/log/ejabberd.log\"' -detached -noshell"
When I try to connect to the server with kopete and use
I(<0.306.0>:ejabberd_c2s:417): ({tlssock,#Port<0.352>,#Port<0.356>}) Failed legacy authentication for myusername@myservername.tld/Kopete
is PAM even coming to play here?
if I type 'ejabberdctl' I get
{"init terminating in do_boot",{badarg,[{ets,match_object,[ejabberd_ctl_cmds,'_']},{ets,tab2list,1},{ejabberd_ctl,print_usage,0},{ejabberd_ctl,start,0},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
and if I type 'ejabberdctl myusername@myservername.tld' I get
RPC failed on the node 'myusername@servernam.tld': nodedown
=ERROR REPORT==== 17-Aug-2007::23:20:05 ===
** System NOT running to use fully qualified hostnames **
** Hostname myservername.tld is illegal **
incidentaly
hostname -s gives myservername and hostname -f gives myservername.tld
the sections of the config file that might be interesting are:
{registration_watchers, ["myusername@servernam.tld"]}.
% Only admins can send announcement messages:
{access, announce, [{allow, admin}]}.
% Only non-blocked users can use c2s connections:
{access, c2s, [{deny, blocked},
{allow, all}]}.
% Set shaper with name "normal" to limit traffic speed to 1000B/s
{shaper, normal, {maxrate, 1000}}.
% Set shaper with name "fast" to limit traffic speed to 50000B/s
{shaper, fast, {maxrate, 50000}}.
% For all users except admins used "normal" shaper
{access, c2s_shaper, [{none, admin},
{normal, all}]}.
% For all S2S connections used "fast" shaper
{access, s2s_shaper, [{fast, all}]}.
% Admins of this server are also admins of MUC service:
{access, muc_admin, [{allow, admin}]}.
% All users are allowed to use MUC service:
{access, muc, [{allow, all}]}.
% This rule allows access only for local users:
{access, local, [{allow, local}]}.
% Authentication method. If you want to use internal user base, then use
% this line:
%{auth_method, internal}.
% For LDAP authentication use these lines instead of above one:
%{auth_method, ldap}.
%{ldap_servers, ["localhost"]}. % List of LDAP servers
%{ldap_uidattr, "uid"}. % LDAP attribute that holds user ID
%{ldap_base, "dc=example,dc=com"}. % Search base of LDAP directory
%{ldap_rootdn, "dc=example,dc=com"}. % LDAP manager
%{ldap_password, "******"}. % Password to LDAP manager
% For authentication via external script use the following:
%{auth_method, external}.
%{extauth_program, "/path/to/authentication/script"}.
% For authentication via ODBC use the following:
%{auth_method, odbc}.
%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.
%%% Add new auth method
{auth_method, [internal, pam]}.
%%% Default pam service "login" can be change
%{pam_service, "login"}.
%%% Default pam prompt "Password:" can be change
%{pam_prompt_pwd, "Password:"}.
% Host name:
{hosts, ["myservername.tld"]}.
and further at the bottom:
{mod_echo, [{host, "echo.myservername"}]},
everything else is as in the default.
thank you for any help,
aron
PS how exactly do I have to change the line
{5280, ejabberd_http, [http_poll, web_admin]},
to get
as in http://www.ejabberd.im/node/1674
Anonymous
I've been trying to install ejabberd with pam authentication.
I compiled everyting as described here:
http://www.ejabberd.im/pam
There are three different contributed patches that (try to) implement PAM auth in ejabberd. None of them is yet included in ejabberd SVN. From what I know, the best of them technically speaking is this one:Authenticate Against PAM (alternate version) , and is being reviewed to be included in ejabberd before the next release is published (see bug tracker issue ). The bad news is that the patch is built against ejabberd SVN, so you may need to make small changes to apply it to ejabberd 1.1.x.
if I type 'ejabberdctl' I get
{"init terminating in do_boot",{badarg,[{ets,match_object,[ejabberd_ctl_cmds,'_']},{ets,tab2list,1},{ejabberd_ctl,print_usage,0},{ejabberd_ctl,start,0},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
In ejabberd 1.1.x, probably the script ejabberdctl is not installed in the right path.
and if I type 'ejabberdctl myusername@myservername.tld' I get
RPC failed on the node 'myusername@servernam.tld': nodedown
=ERROR REPORT==== 17-Aug-2007::23:20:05 ===
** System NOT running to use fully qualified hostnames **
** Hostname myservername.tld is illegal **
incidentaly
hostname -s gives myservername and hostname -f gives myservername.tld
Maybe this works: ejabberdctl myservername
%%% Add new auth method
{auth_method, [internal, pam]}.
%%% Default pam service "login" can be change
%{pam_service, "login"}.
%%% Default pam prompt "Password:" can be change
%{pam_prompt_pwd, "Password:"}.
% Host name:
{hosts, ["myservername.tld"]}.
Please note that the lines with pam configuration are commented. Uncomment them and try again. Or try the pam patch that I linked before.
When I try to connect to the server with kopete and usemyusername@myservername.tld and my password:
I(<0.306.0>:ejabberd_c2s:417): ({tlssock,#Port<0.352>,#Port<0.356>}) Failed legacy authentication for myusername@myservername.tld/Kopete
is PAM even coming to play here?
Probably no, because PAM was not completely configured. Remove the % characters and try again :)
PS how exactly do I have to change the line
to gethttp://localhost:5280 to work but not http://myservername.tld:5280
as in http://www.ejabberd.im/node/1674
As explained in the ejabberd Guide, this configuration should do what you want: