Task:
Upgraded install of eFA 4.x or 5.x with newer MariaDb uses sockets, and root's access not listed w/in database.
Issue:
Need to login as Mailwatch when root access is not defined (access denied for localhost).
Steps:
a. Login:
$ ssh myadminid@efa5.mindwatering.net
<login>
$ sudo su -
<enter password again>
b. Get the password into a variable:
$ MAILWATCHSQLPWD=`grep MAILWATCHSQLPWD /etc/eFa/MailWatch-Config | sed 's/.*://'`
c. Login to MariaDb with mailwatch id:
$ mysql -u mailwatch --password=$MAILWATCHSQLPWD mailscanner
MariaDB [mailscanner]>
Example commands:
MariaDB [mailscanner]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mailscanner |
+--------------------+
2 rows in set (0.002 sec)
MariaDB [mailscanner]> show tables;
+-----------------------+
| Tables_in_mailscanner |
+-----------------------+
| audit_log |
| autorelease |
| blacklist |
| inq |
| maillog |
| mcp_rules |
| mtalog |
| mtalog_ids |
| outq |
| sa_rules |
| saved_filters |
| user_filters |
| users |
| whitelist |
+-----------------------+
14 rows in set (0.001 sec)
MariaDB [mailscanner]> SELECT * FROM users;
...
| id | username | password | fullname | type | quarantine_report | spamscore | highspamscore | noscan | quarantine_rcpt | resetid | resetexpire | lastreset | login_expiry | last_login | login_timeout |
...
Note:
The example produces output w/hashed passwords. Keep these secured.
previous page
|