Hello,

Added a new local user "listarchive2@local".
The user Successfully added and I'm able to login as listarchive2@local.
User management via admin@local still reporting "Not found" for existing users

Added a new local user "localus...@sgi.com"
The user Successfully added and I'm able to login as localus...@sgi.com
User management via admin@local still reporting "Not found" for existing users

Please forgive the fact that I am new to mysql.

Here is what I see when listing the mysql user table. I do not know what the user table supposed to look like.

mysql> show tables;
+-------------------+
| Tables_in_piler   |
+-------------------+
| archiving_rule    |
| attachment        |
| audit             |
| autosearch        |
| counter           |
| counter_stats     |
| customer_settings |
| domain            |
| domain_user       |
| email             |
| email_groups      |
| folder            |
| folder_extra      |
| folder_message    |
| folder_user       |
| google            |
| google_imap       |
| group             |
| group_email       |
| group_user        |
| import            |
| ldap              |
| metadata          |
| note              |
| online            |
| option            |
| rcpt              |
| remote            |
| retention_rule    |
| search            |
| sph_counter       |
| sph_index         |
| tag               |
| user              |
| user_settings     |
| v_attachment      |
| v_messages        |
+-------------------+
37 rows in set (0.00 sec)

mysql> describe user;
+----------------+------------------+------+-----+---------+-------+
| Field          | Type             | Null | Key | Default | Extra |
+----------------+------------------+------+-----+---------+-------+
| uid            | int(10) unsigned | NO   | PRI | NULL    | |
| username       | char(64)         | NO   | UNI | NULL    | |
| realname       | char(64)         | YES  |     | NULL    | |
| samaccountname | char(64)         | YES  |     | NULL    | |
| password       | char(128)        | YES  |     | NULL    | |
| domain         | char(64)         | YES  |     | NULL    | |
| dn             | char(255)        | YES  |     | *       | |
| isadmin        | tinyint(4)       | YES  |     | 0       | |
+----------------+------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)

I've added debug sql to system/database/mysql.php.

Here is the output of admin@login login -> administration -> users access. Reporting existing users "Not found".

   Jul 13 12:14:06 dv-piler-dc21 piler-webui[32119]: sql: SELECT
   user.uid, isadmin, username, realname, domain, email FROM
   user,email  WHERE user.uid=email.uid  group by user.uid ORDER BY
   username ASC  LIMIT 0, 20
   Jul 13 12:14:06 dv-piler-dc21 piler-webui[32119]: sql: SELECT
   COUNT(*) AS num, uid FROM email  group by uid
   Jul 13 12:14:06 dv-piler-dc21 piler-webui[32119]: sql: SELECT * FROM
   customer_settings WHERE domain=(SELECT mapped FROM domain WHERE
   domain=?) local

Here is my attempt to manually execute the mysql query

mysql> SELECT user.uid, isadmin, username, realname, domain, email
    -> FROM user,email
    -> WHERE user.uid='email.uid  group by user.uid'
    -> ORDER BY username
    -> ASC  LIMIT 0,20
    -> ;
+-----+---------+----------+----------------------+--------+--------------------+
| uid | isadmin | username | realname | domain | email |
+-----+---------+----------+----------------------+--------+--------------------+
| 0 | 1 | admin | built-in piler admin | local | admin@local | | 0 | 1 | admin | built-in piler admin | local | auditor@local | | 0 | 1 | admin | built-in piler admin | local | bb...@sgi.com | | 0 | 1 | admin | built-in piler admin | local | jeff...@sgi.com | | 0 | 1 | admin | built-in piler admin | local | k...@sgi.com | | 0 | 1 | admin | built-in piler admin | local | lista...@sgi.com | | 0 | 1 | admin | built-in piler admin | local | listarchive2@local | | 0 | 1 | admin | built-in piler admin | local | listarchive@local | | 0 | 1 | admin | built-in piler admin | local | localus...@sgi.com |
+-----+---------+----------+----------------------+--------+--------------------+
9 rows in set, 1 warning (0.00 sec)

When I enter SELECT COUNT(*) , I get a syntax error. I do not know how to resolve this. I

mysql> SELECT user.uid, isadmin, username, realname, domain, email
    -> FROM user,email
    -> WHERE user.uid='email.uid  group by user.uid'
    -> ORDER BY username ASC  LIMIT 0, 20
    -> SELECT COUNT(*) AS num, uid FROM email  group by uid
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT COUNT(*) AS num, uid FROM email group by uid' at line 5


Thanks,
Carrie


On 07/12/2016 04:45 PM, Janos SUTO wrote:
Hello Carrie,

On 2016-07-12 23:10, Carrie Knox wrote:


The issue that I am seeing is that when I login as admin@local and
select administration -> users, no  existing users are listed.   I
would expect to see the admin@local, auditor@local and
listarchive@local accounts, but instead I am seeing "Not found" for
existing users.

If I select "Add new user" to re-create the listarchive@local account
it reports that the Username is an Existing User.

I'm not sure where to begin in resolving this issue.

hmm, it seems odd. I'd check the user table in the piler database, and
see if it looks correct. Also as admin@local try to create a new user, eg.
us...@sgi.com (I assume you have set this domain in the domain settings
page).

Also try to debug the sql queries to see what's going on: edit system/database/mysql.php
and add the following to the beginning of the query() function:

syslog(LOG_INFO, "sql: $sql " . implode(";", $arr));

then see the mail log for the sql queries, and try to run the same statements
using the mysql client and see the results. Let me know how it goes.

Janos


Reply via email to