# Automatic creation of users and where is the user data stored

**URL:** <https://community.ciphermail.com/t/automatic-creation-of-users-and-where-is-the-user-data-stored/415>\
**Category:** Gateway\
**Created:** [January 23, 2015, 5:28pm UTC](https://community.ciphermail.com/t/automatic-creation-of-users-and-where-is-the-user-data-stored/415 "2015-01-23T17:28:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![289](https://avatars.discourse-cdn.com/v4/letter/2/e480ec/32.png) [@289](https://community.ciphermail.com/u/289)\
**Post date:** [January 23, 2015, 5:28pm UTC](https://community.ciphermail.com/t/automatic-creation-of-users-and-where-is-the-user-data-stored/415/1 "2015-01-23T17:28:36Z")

</div>

Hi Djigzo community,  
I was wondering if there is a faster way to create Users in my Ciphermail.  
Is there a Interface to include many users from an database or to use a  
active directory like LDAP. Or is someone knowing what database Ciphermail  
is using and how I can access it from the Server on which Ciphermail is  
running? Where do I find my created users and where can I find the keys and  
certificates.  
Thx in advantage

---

<div class="post-metadata">

**Author:** ![martijn](https://dub1.discourse-cdn.com/flex017/user_avatar/community.ciphermail.com/martijn/32/127_2.png) [@martijn](https://community.ciphermail.com/u/martijn)\
**Post date:** [January 23, 2015, 5:52pm UTC](https://community.ciphermail.com/t/automatic-creation-of-users-and-where-is-the-user-data-stored/415/2 "2015-01-23T17:52:09Z")

</div>

Hi,

> I was wondering if there is a faster way to create Users in my Ciphermail.  
> Is there a Interface to include many users from an database or to use a  
> active directory like LDAP. Or is someone knowing what database Ciphermail  
> is using and how I can access it from the Server on which Ciphermail is  
> running? Where do I find my created users and where can I find the keys and  
> certificates.

May I ask why you want to create users? In most cases you do not have to  
add users. Users will be added when needed (the exception is when you  
want to use PDF encryption with static passwords).

The best option to interface with the back-end is via SOAP.

There is a command line tool which connects to the back-end via the SOAP  
interface.

The CLI tool can be executed as follows:

cd /usr/share/djigzo

java -cp djigzo.jar mitm.application.djigzo.tools.CLITool

This will show the available commands:

usage: mitm.application.djigzo.tools.CLITool [--add-domain \<DOMAIN\>]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[--add-user \<EMAIL\>] [--delete-domain \<DOMAIN\>] [--delete-user  
\<EMAIL\>]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[--domain \<DOMAIN\>] [--email \<EMAIL\>] [--encode-password \<PASSWORD\>]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[--encrypt] [--get-property \<PROPERTY NAME\>] [--global] [--help]  
[--host  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<HOSTNAME | IP\>] [--import-xml \<XML FILE\>] [--logging] [--port  
\<PORT\>]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[--salt \<SALT\>] [--set-property \<PROPERTY NAME\>] [--soap-password  
\<SOAP  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\>] [--soap-user \<SOAP USER\>] [--value \<VALUE\>]  
&nbsp;&nbsp;&nbsp;&nbsp;--add-domain \<DOMAIN\> Add a domain  
&nbsp;&nbsp;&nbsp;&nbsp;--add-user \<EMAIL\> Add a user  
&nbsp;&nbsp;&nbsp;&nbsp;--delete-domain \<DOMAIN\> Delete a domain  
&nbsp;&nbsp;&nbsp;&nbsp;--delete-user \<EMAIL\> Delete a user  
&nbsp;&nbsp;&nbsp;&nbsp;--domain \<DOMAIN\> The domain  
&nbsp;&nbsp;&nbsp;&nbsp;--email \<EMAIL\> The email address of the user  
&nbsp;&nbsp;&nbsp;&nbsp;--encode-password \<PASSWORD\> Encodes a portal password  
&nbsp;&nbsp;&nbsp;&nbsp;--encrypt If set, the property is an encrypted  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;property  
&nbsp;&nbsp;&nbsp;&nbsp;--get-property \<PROPERTY NAME\> Returns a property value  
&nbsp;&nbsp;&nbsp;&nbsp;--global Set/Get the global options  
&nbsp;&nbsp;&nbsp;&nbsp;--help Show help  
&nbsp;&nbsp;&nbsp;&nbsp;--host \<HOSTNAME | IP\> The host to connect to (127.0.0.1)  
&nbsp;&nbsp;&nbsp;&nbsp;--import-xml \<XML FILE\> Import users and domains from XML  
&nbsp;&nbsp;&nbsp;&nbsp;--logging If set, debug logging will be  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled  
&nbsp;&nbsp;&nbsp;&nbsp;--port \<PORT\> The port to use (9000)  
&nbsp;&nbsp;&nbsp;&nbsp;--salt \<SALT\> Optional salt used for encoding a  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;portal password  
&nbsp;&nbsp;&nbsp;&nbsp;--set-property \<PROPERTY NAME\> Sets a property  
&nbsp;&nbsp;&nbsp;&nbsp;--soap-password \<SOAP PASSWORD\> the user password for SOAP interface  
&nbsp;&nbsp;&nbsp;&nbsp;--soap-user \<SOAP USER\> the user for SOAP interface  
&nbsp;&nbsp;&nbsp;&nbsp;--value \<VALUE\> The value to set

To set a property you can use --set-property. Some properties are  
encrypted. For example the password, portal password, client secret and  
server secret are encrypted. You therefore need to add the --encrypt  
property when you set/get any of these encrypted properties

for example to set the password property (for PDF encryption) of user  
test at example.com use the following command:

java -cp djigzo\_2.4.0-2.jar mitm.application.djigzo.tools.CLITool  
--set-property user.password --email test at example.com --value test  
--encrypt

You can import users and domains (and any property) in bulk from an XML  
file using the --import-xml command.

An example XML import file can be downloaded from

[http://www.djigzo.com/downloads/djigzo-import.xml](http://www.djigzo.com/downloads/djigzo-import.xml)

WARNING: you can screw up the gateway (not beyond repair though) when  
using the CLI tool.

the CLI tool does not validate any user input. You can set property  
values to any value even if that value doesn't make sense. For example  
the only legal values for the locality property are "internal" or  
"external". You can however set it to any value, even to values which  
are not valid. If you set an encrypted property value but forget to  
provide the --encrypt parameter, the next time the property is read by  
the system, decrypting the value will fail (which will result in  
undefined behaviour).

Kind regards,

Martijn Brinkers

> **···**
>
> On 01/23/2015 06:28 PM, 289 wrote:
> 
> --  
> CipherMail email encryption
> 
> Open source email encryption gateway with support for S/MIME, OpenPGP  
> and PDF messaging.
> 
> > **[CipherMail email encryption and digital signatures](https://www.ciphermail.com)**
> >
> > Easy to use server-side email encryption for automatic encryption and digital signing of email.
> 
> Twitter: [http://twitter.com/CipherMail](http://twitter.com/CipherMail)
