Create User

Usage

create user $user@$domain

- or - 

create user $user domain $domain

Description

The command create user will create a Virtual User for REVLY. Users may use a single sign-on username and password to access REVLY services. The user will have access and rights to services defined by the command's parameters.

Symbol

create user

Cardinal

action-identifier

Language

User Admin

Module

Admin

Parameters

ChangeDate

usage: changedate $timestamp

description: A Unix timestamp representing the last time the user record was modified.

default: Current timestamp

CreateDate

usage: createdate $timestamp

description: A Unix timestamp representing the time the user record was created.

default: Current timestamp

Domain

usage: domain $domain

description: The name of a domain that this user is a part of.

LDAP Suffix

usage: ldap suffix $ldapsuffix

description: The base search path of the LDAP tree.

default: revly

Name

usage: name $name

description: The real name of the user.

Password

usage: password $password

description: Sets a password for the user. The user allows a group administrator to login with the group name as a username.

Service

usage: service $service [$service etc..]

description: A list of services that the group will have access to.

Actions

- Encrypt a new user's password if provided.

- Generate a LDIF file containing the new user's information.

- Execute ldapmodify to add the user to OpenLDAP.

Template

# Create virtualUser
dn: user=:#USER#:,domain=:#DOMAIN#:,o=domains,dc=:#LDAP_SUFFIX#:
changetype: add
objectClass: top
objectClass: virtualUser
active: TRUE
delete: FALSE
[:#NAME#:]
user: :#USER#:
domain: :#DOMAIN#:
mail: :#USER#:@:#DOMAIN#:
[:#PASSWORD#:]
homeDirectory: /var/vmail/domains/:#DOMAIN#:/:#USER#:/
mailbox: maildir:/var/vmail/domains/:#DOMAIN#:/:#USER#:/
[:#SERVICE#:]
:#CREATE_DATE#:
:#CHANGE_DATE#:

Sub-Templates

CreateDate

createDate: :#CREATE_DATE#:

ChangeDate

changeDate: :#CHANGE_DATE#:

Domain

domain: :#DOMAIN#:

Name

name: :#NAME#:

Password

userPassword: :#PASSWORD#:

Serivce

service: :#SERVICE#:

Return Codes

CodeHuman Readable Output
0Created the user '$user'.
1Could not create the user '$user' because it already exists.

Example

Input

create user sally@example.com name "Sally Roe" password "secret" service email groupware im

Generated LDIF file

# Create virtualUser
dn: user=sally,domain=example.com,o=domains,dc=revly
changetype: add
objectClass: top
objectClass: virtualUser
active: TRUE
delete: FALSE
name: Sally Roe
user: sally
domain: example.com
mail: sally@example.com
userPassword: {SSHA}GojpJiwrtz6zYKLyNa6nIoMy0GUS/LaYsgFSbA==
homeDirectory: /var/vmail/domains/example.com/sally/
mailbox: maildir:/var/vmail/domains/example.com/sally/
service: email
service: groupware
service: im
createDate: 1419358202
changeDate: 1419358202

Output

Created the user 'sally@example.com'.

Returncode

0