New: promote.user.to.be.global.admin.html.
This commit is contained in:
parent
b8e5770381
commit
0959f8ff2b
|
@ -0,0 +1,56 @@
|
|||
# Promote a mail user to be global admin
|
||||
|
||||
[TOC]
|
||||
|
||||
## Summary
|
||||
|
||||
If you forgot password of existing global admin account, or mistakenly removed
|
||||
global admin, you can promote an existing mail user to be a global admin by
|
||||
following this tutorial.
|
||||
|
||||
## Promote user to be global admin
|
||||
|
||||
### SQL backends
|
||||
|
||||
Let's say you want to promote existing mail user `john@example.com` to be
|
||||
__global admin__, here's SQL commands to achieve this goal (note: we use MySQL
|
||||
for example):
|
||||
|
||||
```
|
||||
sql> USE vmail;
|
||||
sql> UPDATE mailbox SET isadmin=1, isglobaladmin=1 WHERE username='john@example.com';
|
||||
sql> INSERT INTO domain_admins (username, domain) VALUES ('john@example.com', 'ALL');
|
||||
```
|
||||
|
||||
That's it, you can now login to iRedAdmin as `john@example.com` (with `john@example.com`'s password).
|
||||
|
||||
To promote user `smith@test.com` to be admin of domain `test.com`:
|
||||
|
||||
```
|
||||
sql> USE vmail;
|
||||
sql> UPDATE mailbox SET isadmin=1, isglobaladmin=0 WHERE username='smith@test.com';
|
||||
sql> INSERT INTO domain_admins (username, domain) VALUES ('smith@test.com', 'test.com');
|
||||
```
|
||||
|
||||
### LDAP backends
|
||||
|
||||
To promote existing mail user `john@example.com` to be __global admin__:
|
||||
|
||||
* Update LDAP object of mail user `john@example.com` (its full dn is:
|
||||
`mail=john@example.com,ou=Users,domainName=example.com,o=domains,dc=xx,dc=xx`),
|
||||
add LDAP attribute `enabledService=domainadmin` and `domainGlobalAdmin=yes`.
|
||||
|
||||
To promote existing mail user `smith@test.com` to be admin of domain `test.com`:
|
||||
|
||||
1. Update LDAP object of mail user `smith@test.com` (its full dn is:
|
||||
`mail=smith@test.com,ou=Users,domainName=test.com,o=domains,dc=xx,dc=xx`),
|
||||
add LDAP attribute/value pair: `enabledService=domainadmin`.
|
||||
|
||||
1. Update LDAP object of mail domain `test.com` (its full dn is:
|
||||
`domainName=test.com,o=domains,dc=xx,dc=xx`), add LDAP attribute/value pair:
|
||||
`domainAdmin=smith@test.com`.
|
||||
|
||||
## See also
|
||||
|
||||
* [Reset user password](./reset.user.password.html)
|
||||
* [Password hashes used/supported by iRedMail](./password.hashes.html)
|
|
@ -52,3 +52,4 @@ sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='user@domain.ltd
|
|||
## See also
|
||||
|
||||
* [Password hashes used/supported by iRedMail](./password.hashes.html)
|
||||
* [Promote a mail user to be global admin](./promote.user.to.global.admin.html)
|
||||
|
|
|
@ -119,6 +119,7 @@
|
|||
<li><a href="per-account.transport.html">Per-domain or per-user transport (relay)</a></li>
|
||||
<li><a href="per-user.send.receive.restrictions.html">[DEPRECATED] Per-user outbound restrictions</a></li>
|
||||
<li><a href="pipe.incoming.email.for.certain.user.to.external.script.html">Pipe incoming email for certain user to external script </a></li>
|
||||
<li><a href="promote.user.to.be.global.admin.html">Promote a mail user to be global admin</a></li>
|
||||
<li><a href="public.folder.html">How to create and manage public folder</a></li>
|
||||
<li><a href="recalculate.mailbox.quota.html">Force Dovecot to recalculate mailbox quota</a></li>
|
||||
<li><a href="relayhost.html">Setup relayhost</a></li>
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Promote a mail user to be global admin</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<a href="/index.html" target="_blank">
|
||||
<img alt="iRedMail web site"
|
||||
src="./images/logo-iredmail.png"
|
||||
style="vertical-align: middle; height: 30px;"
|
||||
/>
|
||||
<span>iRedMail</span>
|
||||
</a>
|
||||
// <a href="./index.html">Document Index</a></div><h1 id="promote-a-mail-user-to-be-global-admin">Promote a mail user to be global admin</h1>
|
||||
<div class="toc">
|
||||
<ul>
|
||||
<li><a href="#promote-a-mail-user-to-be-global-admin">Promote a mail user to be global admin</a><ul>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
<li><a href="#promote-user-to-be-global-admin">Promote user to be global admin</a><ul>
|
||||
<li><a href="#sql-backends">SQL backends</a></li>
|
||||
<li><a href="#ldap-backends">LDAP backends</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2 id="summary">Summary</h2>
|
||||
<p>If you forgot password of existing global admin account, or mistakenly removed
|
||||
global admin, you can promote an existing mail user to be a global admin by
|
||||
following this tutorial.</p>
|
||||
<h2 id="promote-user-to-be-global-admin">Promote user to be global admin</h2>
|
||||
<h3 id="sql-backends">SQL backends</h3>
|
||||
<p>Let's say you want to promote existing mail user <code>john@example.com</code> to be
|
||||
<strong>global admin</strong>, here's SQL commands to achieve this goal (note: we use MySQL
|
||||
for example):</p>
|
||||
<pre><code>sql> USE vmail;
|
||||
sql> UPDATE mailbox SET isadmin=1, isglobaladmin=1 WHERE username='john@example.com';
|
||||
sql> INSERT INTO domain_admins (username, domain) VALUES ('john@example.com', 'ALL');
|
||||
</code></pre>
|
||||
|
||||
<p>That's it, you can now login to iRedAdmin as <code>john@example.com</code> (with <code>john@example.com</code>'s password).</p>
|
||||
<p>To promote user <code>smith@test.com</code> to be admin of domain <code>test.com</code>:</p>
|
||||
<pre><code>sql> USE vmail;
|
||||
sql> UPDATE mailbox SET isadmin=1, isglobaladmin=0 WHERE username='smith@test.com';
|
||||
sql> INSERT INTO domain_admins (username, domain) VALUES ('smith@test.com', 'test.com');
|
||||
</code></pre>
|
||||
|
||||
<h3 id="ldap-backends">LDAP backends</h3>
|
||||
<p>To promote existing mail user <code>john@example.com</code> to be <strong>global admin</strong>:</p>
|
||||
<ul>
|
||||
<li>Update LDAP object of mail user <code>john@example.com</code> (its full dn is:
|
||||
<code>mail=john@example.com,ou=Users,domainName=example.com,o=domains,dc=xx,dc=xx</code>),
|
||||
add LDAP attribute <code>enabledService=domainadmin</code> and <code>domainGlobalAdmin=yes</code>.</li>
|
||||
</ul>
|
||||
<p>To promote existing mail user <code>smith@test.com</code> to be admin of domain <code>test.com</code>:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Update LDAP object of mail user <code>smith@test.com</code> (its full dn is:
|
||||
<code>mail=smith@test.com,ou=Users,domainName=test.com,o=domains,dc=xx,dc=xx</code>),
|
||||
add LDAP attribute/value pair: <code>enabledService=domainadmin</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Update LDAP object of mail domain <code>test.com</code> (its full dn is:
|
||||
<code>domainName=test.com,o=domains,dc=xx,dc=xx</code>), add LDAP attribute/value pair:
|
||||
<code>domainAdmin=smith@test.com</code>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2 id="see-also">See also</h2>
|
||||
<ul>
|
||||
<li><a href="./reset.user.password.html">Reset user password</a></li>
|
||||
<li><a href="./password.hashes.html">Password hashes used/supported by iRedMail</a></li>
|
||||
</ul><div class="footer">
|
||||
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-3293801-21', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</body></html>
|
|
@ -68,6 +68,7 @@ sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='user@domain.
|
|||
<h2 id="see-also">See also</h2>
|
||||
<ul>
|
||||
<li><a href="./password.hashes.html">Password hashes used/supported by iRedMail</a></li>
|
||||
<li><a href="./promote.user.to.global.admin.html">Promote a mail user to be global admin</a></li>
|
||||
</ul><div class="footer">
|
||||
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue