Add password while creating user with curl.

This commit is contained in:
iredmail 2019-10-14 16:21:43 +08:00
parent 89ce3ab05b
commit a23f71c751
4 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ curl -X POST -i -b cookie.txt -d "cn=ABC Inc.&quota=20480" https://<server>/ired
#
# cn=Zhang Huangbin (display name: "Zhang Huangbin")
# mailQuota=1024 (mailbox quota: 1 GB)
curl -X POST -i -b cookie.txt -d "cn=Zhang Huangbin&mailQuota=1024" https://<server>/iredadmin/api/user/<mail>
curl -X POST -i -b cookie.txt -d "password=A@StrongPassword2&cn=Zhang Huangbin&mailQuota=1024" https://<server>/iredadmin/api/user/<mail>
#
# Delete mail user (DELETE)

View File

@ -42,7 +42,7 @@ requests.post(url + '/domain/test.com',
requests.post(url + '/user/zhb@test.com',
cookies=cookies,
data={'cn': 'My Name',
'password': '1@Password',
'password': 'A@StrongPassword2',
'preferredLanguage': 'zh_CN',
'mailQuota': 2048})

View File

@ -51,7 +51,7 @@ curl -X POST -i -b cookie.txt -d &quot;cn=ABC Inc.&amp;quota=20480&quot; https:/
#
# cn=Zhang Huangbin (display name: &quot;Zhang Huangbin&quot;)
# mailQuota=1024 (mailbox quota: 1 GB)
curl -X POST -i -b cookie.txt -d &quot;cn=Zhang Huangbin&amp;mailQuota=1024&quot; https://&lt;server&gt;/iredadmin/api/user/&lt;mail&gt;
curl -X POST -i -b cookie.txt -d &quot;password=A@StrongPassword2&amp;cn=Zhang Huangbin&amp;mailQuota=1024&quot; https://&lt;server&gt;/iredadmin/api/user/&lt;mail&gt;
#
# Delete mail user (DELETE)

View File

@ -58,7 +58,7 @@ requests.post(url + '/domain/test.com',
requests.post(url + '/user/zhb@test.com',
cookies=cookies,
data={'cn': 'My Name',
'password': '1@Password',
'password': 'A@StrongPassword2',
'preferredLanguage': 'zh_CN',
'mailQuota': 2048})