2 Replies Latest reply: Feb 2, 2011 8:54 PM by Sam Venning
cpguru21 Level 1 (55 points)

OSX 10.6.5 on an x-serve.

Is there a way to have the account my users use for jabber server on their client (we ONLY have an internal ichat server) reflect the actual users set up on the server?

As an example, clients have users that were added at one time, but now those users are no longer employees and accounts are deleted.

Is there a way to clean this up without traveling to each computer?

X-Serve, iMac - Various years, Macbook Pro 2010, iPhone, AIX, Windows 7, Mac OS X (10.6.5)
  • Tim Harris Level 4 (1,460 points)
    Yes - you can use the command line tool jabber_autobuddy. Use the -h switch for more info. Make a backup of your DB first.
  • Sam Venning Level 1 (5 points)
    Trimming users from iChat (Jabber) service is a manual, command line, process. I keep this list of commands nearby as a reference.

    • To check status of Jabber service
    *server:~ ladmin$ sudo serveradmin fullstatus jabber*
    jabber:state = "RUNNING"
    jabber:readWriteSettingsVersion = 1
    jabber:logPaths:PROXY_LOG = "/private/var/jabberd/log/proxy65.log"
    jabber:logPaths:MUCSTDLOG = "/var/jabberd/log/mu-conference.log"
    jabber:logPaths:JABBER_LOG = "/var/log/system.log"
    jabber:proxyState = "RUNNING"
    jabber:currentConnections = "1"
    jabber:currentConnectionsPort1 = "1"
    jabber:currentConnectionsPort2 = "0"
    jabber:pluginVersion = "10.6.100"
    jabber:serviceMode = "CHATSERVER"
    jabber:domainName = "server01.pretendco.com"
    jabber:mucState = "RUNNING"
    jabber:servicePortsAreRestricted = "NO"
    jabber:servicePortsRestrictionInfo = emptyarray
    jabber:hosts:arrayindex:0 = "server01.pretendco.com"
    jabber:setStateVersion = 1
    jabber:startedTime = "2010-05-17 15:02:02 +1000"
    jabber:jabberdState = "RUNNING"
    server:~ ladmin$

    • AutoBuddy feature
    One time only and used to automatically add users to buddy list:
    *server:~ ladmin$ sudo serveradmin settings jabber:enableAutoBuddy = yes*
    This will do the same thing but the above command is better.
    *server:~ ladmin$ sudo /usr/bin/jabber_autobuddy -m*
    This will automatically add users to your buddy list but not necessarily "authorise" them (to be able to see availability status). I've read a suggestion it is better to leave enableAutoBudy = 'no' and let people add others manually to their buddy list. I haven't decided which is better.
    *server:~ ladmin$ sudo serveradmin settings jabber:enableAutoBuddy = no*

    • Start and stop Jabber service from command line
    *sudo serveradmin stop jabber*
    *sudo serveradmin start jabber*

    • To get a list of users registered in iChat (Jabber) service
    server:~ ladmin$ *sudo sqlite3 /var/jabberd/sqlite/jabberd2.db "select * from active"*
    user1@server01.pretendco.com |1|1274326417
    user2@server01.pretendco.com |2|1274326419
    user3@server01.pretendco.com |3|1274326421
    user4@server01.pretendco.com |4|1274326423
    user5@server01.pretendco.com |5|1274326431
    user6@server01.pretendco.com |6|1274326540
    user7@server01.pretendco.com |7|1274326559
    server:~ ladmin$

    • To remove a user from buddy list
    *server:~ ladmin$ sudo /usr/bin/jabber_autobuddy -r user5@server01.pretendco.com*

    • To delete user from Jabber database
    *server:~ ladmin$ sudo /usr/bin/jabber_autobuddy -d user5@server01.pretendco.com*

    • To delete the database altogether
    *server:~ ladmin$ sudo rm /private/var/jabberd/sqlite/jabberd2.db*

    • To check existence of database
    *server:~ ladmin$ sudo ls -la /private/var/jabberd/sqlite*

    Message was edited by: Sam Venning