How to add users to the StaticUserRepository for JBoss Mail Server 1.0-M3
versions: 1.0M3, 1.0M4
Overview
The GUI installer configures this static user repository in the base descriptor for JBMS. Unfortunately, this requires a restart of JBMS just to add, remove or change users! It is recommended that you consider JAAS integration such as the database login module as an alternative as it does not require restarts.
Edit the StaticUserRepository
In the jboss-service.xml you should see an entry like this:
<!-- StaticUserRepository maintains the user account information as part of this configuration. You must specify the username and password below. Each user will be accepted as a local mailbox for any domain in the local domain group. --> <mbean code="org.jboss.mail.userrepository.StaticUserRepository" name="jboss.mail:type=MailServices,name=UserRepository,uimanageable=true"> <attribute name="Users"> <users> <user><id>andy</id><password>testpwd</password></user> <user><id>test</id><password>testpwd</password></user> </users> </attribute> </mbean>
You can see that two users are defined, "andy" and "test" and that both have the password "testpwd". To add another user, just add another line. For instance if we want to add the user SavySysAdmin with the password jbossMailRulez we would change it to read like this:
<!-- StaticUserRepository maintains the user account information as part of this configuration. You must specify the username and password below. Each user will be accepted as a local mailbox for any domain in the local domain group. --> <mbean code="org.jboss.mail.userrepository.StaticUserRepository" name="jboss.mail:type=MailServices,name=UserRepository,uimanageable=true"> <attribute name="Users"> <users> <user><id>andy</id><password>testpwd</password></user> <user><id>test</id><password>testpwd</password></user> <user><id>SavySysAdmin</id><password>jbossMailRulez</password></user> </users> </attribute> </mbean>
Comments