[JDEV] How to Delete a user from Jabber Server, other people's rosters and the JUD?
Nicholas Perez
nick at jabberstudio.org
Thu May 30 16:29:42 CDT 2002
Unfortunately, removing users from a jabber server is harder than it
looks. You have to take into account the xdb cache and in memory caching
in jsm.
Currently there is no real good way to remove a user. Removing the
user.xml doesn't guarantee it will inaccessable largely because it is
cached in so many places. To remove a user it requires a kill -15 to the
main jabberd (shutdown the server) not a nice option.
Technically accoring to protocol sending an iq:register with a <remove>
tag should remove you (works for transports but not jsm, go figure) but
it doesn't. So the next best thing is to just change their password to
god awful long MD5 hex string so they cannot access it. But this is
still bad because that username is still cached in jsm therefore it will
still get offline messages indefinitely (if there is mod_offline).
No real clean way to remove users at this point...we are going to need
to wait for 1.5 where the server can take a SIGHUP to flush dead users.
(if you can't tell I have studied this abit :)
As for modifying rosters left and right, thats going to be a little more
difficult. After gathering the dead user's roster, it should be
acceptable to send:
<presence type='unsubscribe' from='deaduser at server.com'
to='roster_item at otherserver.com'>
for each roster item as a component or something on the jabberd backbone
where you dont have the restrictions of jsm, and clean up that way.
The bad part about that is the amount of packets to do this, where as if
the Header JEP (does it do other packet types or just messages? it
should do presence too...) did presence packets you could send one large
packet with an unsub to all the roster items at once.
<plug>
But if anyone is really interested in helping me with JabminRPC stuff
perl or C++ then by all means send me an email off list or jabber me.
There is a bunch of code just sitting there not doing anything except
getting bitrot, and i could use some motiviation/fresh faces :)
</plug>
Anyhow, this email is over.
Nick
Peter Saint-Andre wrote:
>>1) they are unsubscribed from everyone's rosters
>
>
> This is the hard part. AFAIK that functionality is not on the roadmap.
>
> Good admin tools would be nice, eh? Not sure if this stuff would/will be
> covered by Nick's JabminRPC code....
>
> /stpeter
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list