New: html/sql.mark.user.as.admin.html.
This commit is contained in:
parent
cdf5604d47
commit
fc121f1151
|
@ -0,0 +1,40 @@
|
||||||
|
# SQL: Mark existing mail user as global domain admin
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
### Mark user as global domain admin with iRedAdmin-Pro
|
||||||
|
|
||||||
|
With iRedAdmin-Pro, you can mark user as either global domain admin or normal
|
||||||
|
domain admin in user profile page, under tab `General`.
|
||||||
|
|
||||||
|
![](../images/iredadmin/user_profile_general.png)
|
||||||
|
|
||||||
|
### Mark user as global domain admin with SQL command line tool
|
||||||
|
|
||||||
|
> If you don't have any mail account, please follow this tutorial to create a
|
||||||
|
> new mail user: [SQL: Bulk create mail users](./sql.bulk.create.mail.users.html).
|
||||||
|
|
||||||
|
Let's say you want to mark existing user `user@mydomain.com` as global domain
|
||||||
|
admin, please follow steps below to achieve this.
|
||||||
|
|
||||||
|
* Login to SQL server as either SQL root user or `vmailadmin` user.
|
||||||
|
|
||||||
|
* About SQL root user:
|
||||||
|
|
||||||
|
* for MySQL or MariaDB: SQL root user is `root`.
|
||||||
|
* for PostgreSQL: it's system account `postgres` on Linux, or
|
||||||
|
`postgresql` on FreeBSD, or `_pgsql` on OpenBSD.
|
||||||
|
|
||||||
|
* You can find their passwords in file `iRedMail.tips` under iRedMail
|
||||||
|
installation directory. for example, `/root/iRedMail-0.9.3/iRedMail.tips`.
|
||||||
|
|
||||||
|
* Update SQL table `vmail.mailbox` and `vmail.domain_admins` to mark this user
|
||||||
|
as global domain admin:
|
||||||
|
|
||||||
|
```
|
||||||
|
sql> UPDATE mailbox SET isadmin=1,isglobaladmin=1 WHERE username='user@mydomain.com';
|
||||||
|
sql> INSERT INTO domain_admins (username, domain) VALUES ('user@mydomain.com', 'ALL');
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can login to iRedAdmin-Pro as `user@mydomain.com`, it's global domain
|
||||||
|
admin.
|
|
@ -112,6 +112,7 @@
|
||||||
<li><a href="sql.bulk.create.mail.users.html">SQL: Bulk create mail users</a></li>
|
<li><a href="sql.bulk.create.mail.users.html">SQL: Bulk create mail users</a></li>
|
||||||
<li><a href="sql.create.catch-all.html">SQL: Add per-domain catch-all account</a></li>
|
<li><a href="sql.create.catch-all.html">SQL: Add per-domain catch-all account</a></li>
|
||||||
<li><a href="sql.create.mail.alias.html">SQL: Add a mail alias account</a></li>
|
<li><a href="sql.create.mail.alias.html">SQL: Add a mail alias account</a></li>
|
||||||
|
<li><a href="sql.mark.user.as.admin.html">SQL: Mark existing mail user as global domain admin</a></li>
|
||||||
<li><a href="sql.user.mail.forwarding.html">SQL: User mail forwarding</a></li>
|
<li><a href="sql.user.mail.forwarding.html">SQL: User mail forwarding</a></li>
|
||||||
<li><a href="store.spamassassin.bayes.in.sql.html">Store SpamAssassin bayes in SQL</a></li>
|
<li><a href="store.spamassassin.bayes.in.sql.html">Store SpamAssassin bayes in SQL</a></li>
|
||||||
<li><a href="use.a.bought.ssl.certificate.html">Use a bought SSL certificate</a></li>
|
<li><a href="use.a.bought.ssl.certificate.html">Use a bought SSL certificate</a></li>
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>SQL: Mark existing mail user as global domain admin</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="navigation">
|
||||||
|
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
|
||||||
|
|
||||||
|
// <a href="./index.html">Document Index</a>
|
||||||
|
</div><h1 id="sql-mark-existing-mail-user-as-global-domain-admin">SQL: Mark existing mail user as global domain admin</h1>
|
||||||
|
<div class="toc">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#sql-mark-existing-mail-user-as-global-domain-admin">SQL: Mark existing mail user as global domain admin</a><ul>
|
||||||
|
<li><a href="#mark-user-as-global-domain-admin-with-iredadmin-pro">Mark user as global domain admin with iRedAdmin-Pro</a></li>
|
||||||
|
<li><a href="#mark-user-as-global-domain-admin-with-sql-command-line-tool">Mark user as global domain admin with SQL command line tool</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<h3 id="mark-user-as-global-domain-admin-with-iredadmin-pro">Mark user as global domain admin with iRedAdmin-Pro</h3>
|
||||||
|
<p>With iRedAdmin-Pro, you can mark user as either global domain admin or normal
|
||||||
|
domain admin in user profile page, under tab <code>General</code>.</p>
|
||||||
|
<p><img alt="" src="../images/iredadmin/user_profile_general.png" /></p>
|
||||||
|
<h3 id="mark-user-as-global-domain-admin-with-sql-command-line-tool">Mark user as global domain admin with SQL command line tool</h3>
|
||||||
|
<blockquote>
|
||||||
|
<p>If you don't have any mail account, please follow this tutorial to create a
|
||||||
|
new mail user: <a href="./sql.bulk.create.mail.users.html">SQL: Bulk create mail users</a>.</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>Let's say you want to mark existing user <code>user@mydomain.com</code> as global domain
|
||||||
|
admin, please follow steps below to achieve this.</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<p>Login to SQL server as either SQL root user or <code>vmailadmin</code> user.</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<p>About SQL root user:</p>
|
||||||
|
<ul>
|
||||||
|
<li>for MySQL or MariaDB: SQL root user is <code>root</code>.</li>
|
||||||
|
<li>for PostgreSQL: it's system account <code>postgres</code> on Linux, or
|
||||||
|
<code>postgresql</code> on FreeBSD, or <code>_pgsql</code> on OpenBSD.</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>You can find their passwords in file <code>iRedMail.tips</code> under iRedMail
|
||||||
|
installation directory. for example, <code>/root/iRedMail-0.9.3/iRedMail.tips</code>.</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Update SQL table <code>vmail.mailbox</code> and <code>vmail.domain_admins</code> to mark this user
|
||||||
|
as global domain admin:</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code>sql> UPDATE mailbox SET isadmin=1,isglobaladmin=1 WHERE username='user@mydomain.com';
|
||||||
|
sql> INSERT INTO domain_admins (username, domain) VALUES ('user@mydomain.com', 'ALL');
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Now you can login to iRedAdmin-Pro as <code>user@mydomain.com</code>, it's global domain
|
||||||
|
admin.</p><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. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<script>
|
||||||
|
(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>
|
Loading…
Reference in New Issue