Edit User

Usage

edit user $user@$domain

- or - 

edit user $user domain $domain

Description

The command edit user is used to modify a Virtual User record for REVLY. This command may be used to alter the parameters Name, Password, and Service.

Symbol

edit 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

LDAP Suffix

usage: ldap suffix $ldapsuffix

description: The base search path of the LDAP tree.

default: revly

Change Name

usage: change name $name

description: Change the real name of a user.

Change Password

usage: change password $password

description: Set a new password for the user.

Add Service

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

description: Add a service to the list of services that the user will have access to.

Remove Service

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

description: Remove a service from the list of services that the user will have access to.

Replace Service

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

description: Replace all services that the user will have access to with the supplied service or services.

Actions

- Encrypt a new user password if provided.

- Generate a LDIF file containing the alterations to the user record.

- Execute ldapmodify to edit the user record in OpenLDAP.

Template

# Edit virtualUser
dn: user=:#USER#:,domain=:#DOMAIN#:,o=domains,dc=:#LDAP_SUFFIX#:
changetype: modify
[:#CHANGE_NAME#:]
[:#CHANGE_PASSWORD#:]
[:#ADD_SERVICE#:]
[:#REMOVE_SERVICE#:]
[:#REPLACE_SERVICE#:]
replace: changeDate
:#CHANGE_DATE#:

Sub-Templates

changeDate: :#CHANGE_DATE#:

ChangeName

replace: name
:#NAME#:
-

Name

name: :#NAME#:

Add Service

add: maildrop
:#MAILDROP#:
-

Remove Service

delete: service
:#SERVICE#:
-

Replace Service

replace: service
:#SERVICE#:
-

Service

service: :#SERVICE#:

Return Codes

CodeHuman Readable Output
0Edited the user '$user@$domain'.
1Could not edit the user '$user@$domain' because it does not exist.
2Failed to add attributes to the user '$user@$domain' because one or more attributes already exists.
3Failed to remove attributes from the user '$user@$domain' because one or more attributes does not exist.

Example

Input

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

Generated LDIF file

# Edit virtualUser
dn: user=sally,domain=example.com,o=domains,dc=revly
changetype: modify
replace: name
name: Sally Roe
-
replace: userPassword
userPassword: {SSHA}GojpJiwrtz6zYKLyNa6nIoMy0GUS/LaYsgFSbA==
-
replace: service
service: email
service: groupware
service: im
-
replace: changeDate
changeDate: 1419358202

Output

Edited the user 'sally@example.com'.

Returncode

0