This section attempts to provide a guide for the most common day-to-day Jabberd administrative tasks, including user management.
Detailed configuration information begins in the next section.
This section describes how to start and stop the Jabberd 2 binaries. See Appendix 7 for running Jabberd 2 with an RC script or Appendix 8 for running Jabberd 2 using Daemontools.
jabberd start script starts the Jabberd 2 server. This
script is installed in the same directory with the Jabberd 2 binaries
/usr/local/jabberd by default). To start the server, switch
jabber user and run the start script:
su jabber /usr/local/bin/jabberd
The script handles the starting of the five Jabberd 2 binaries. The script
assigns the relevant configuration file (located in
/usr/local/etc/jabberd by default) for each Jabberd 2 binary.
There is currently no shutdown script for Jabberd 2; therefore, the five Jabberd 2 processes must be killed manually in order to shut the server down. To stop the server, kill the following processes (either as root or the jabber user):
router resolver sm c2s s2s
Stopping one of the processes above may cause another to die; however, it is important to make sure that all Jabberd 2 proccesses have died before attempting a restart. A single running process may prevent the server from restarting.
The source distribution contains a script named
migrate-jd14dir-2-sqlite.pl that can be used to upgrade a
Jabberd 1.4 database to a SQLite database suitable for Jabberd2.
At the time of writing, there are no scripts for adding users; however, users can be added easily to a MySQL or PostgreSQL database. This section describes how to add a user to a MySQL database. Adding a user to PostgreSQL, would be similar. This section assumes that public registration has been disabled (see Section 5.5).
user section of
sm.xml contains a tag named
auto-create, and enabling this tag causes a user to be created
in the storage package the first time a user logs on if that user does not
yet exist in that database. With this tag enabled, users can be manually
added to the authentication (
authreg) database, and when each
user logs in for the first time, Jabberd will create rosters, templates,
etc. for that user. Specifically, the
auto-create tag causes
user-create chain to be called when a new user logs in for
the first time.
Auto-create is disabled by default. To enable it, uncomment the
auto-create tag in the
user section of the
sm.xml file. This tag is near the end of the
auto-create is enabled, you can create a user from
the MySQL console.
Log onto the MySQL console as the Jabberd user:
mysql -u jabberd2 -p
From the MySQL console, Switch to the
mysql> use jabberd2
From the MySQL console, Insert a row into the
The row should contain values for
mysql> insert into authreg (username, realm, password) -> values ('myusername', 'somedomain.com', 'mypassword');
Change the value of
somedomain.com to match your
configuration. In most cases, the realm will be the same as the ID of the
Jabber server. Change
to the name and password for your new user.
Your new user will now be able to log on using a Jabber client.
The MySQL console can be used to delete users from a MySQL authentication database (authreg). Enter this command to delete a user:
mysql> delete from authreg where username='the_user_name';
Note that deleting the user from the
authreg table will not
delete additional user data, such as rosters; however, once the user has
been deleted from the
authreg table, the user will no longer
be able to log on to the Jabberd server.
Sending MOTD's (Messages of the Day) and messages to all online users must
be done from an administrative account with
privileges. See Section 5.4 for
information about how to assign these privileges. Once an account has
broadcast privileges, these messages can be sent from a Jabber
client. Add the following contacts to the administrative account you have
Sending a message to
somedomain.com/announce will send a
Jabber MOTD to all users on the domain. Offline users will receive the
message the next time they log on. Sending a message to
somedomain.com/announce/online sends a message only to online
users. Note that if your Jabber client does not provide explicit support
for MOTD's, you can add a contact with the JID's above, and use that
contact to send MOTD's.
|© 2003 Will Kamishlian and Robert Norris|
|This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.|