Fresh install, admin nor auditor @ local work?

Issue #222 resolved
ally_wilson created an issue

Hi, Just did a fresh install on CentOS 6.4 64-bit, had a few minor issues to get it installed (needed mysql++-devel and php).

It seems to be up and running now - it's just that I can't login using admin@local:pilerrocks or auditor@local:auditor

Can't see anything in the apache log directory indicating the problem.

Is there a way to create/recreate the admin password in mysql?

Thanks

Comments (6)

  1. Janos SUTO repo owner

    Yes, there is.. Firstly, please check if you have some entries in the user table. If not then create an entry:

    insert into `user` (`uid`, `username`, `realname`, `samaccountname`, `password`, `isadmin`, `domain`) values (0, 'admin', 'built-in piler admin', '', '$1$PItc7d$zsUgON3JRrbdGS11t9JQW1', 1, 'local');
    insert into `email` (`uid`, `email`) values(0, 'admin@local');
    

    If you have an admin account in the user table, then you are free to change the password. It's a standard crypted password in the 'password' field.

    However note that the installer script usually creates all necessary database entries. Let me know how it goes.

  2. ally_wilson reporter

    After looking at the mysql db, I realised I didn't have the "user" table, in-fact I didn't have anything except "sph_index", so the above wasn't my issue it seems (but you pointed me in the correct direction).

    I'd been following 3 different guides for the install (yours, extremeshok.com's and petermolnar.me's) and on Peter's I found this entry which I missed previously:

    mysql -u piler -p < util/db-mysql.sql
    

    Modified it by putting the piler db name in there after the -p password prompt - and I now have access using admin@local and auditor@local. The DB now looks a lot better with more tables than just that sphinx one :-)

    I've got mail being delivered to the host now, and the log is showing it is accepting the mails and being processed. It's just weird I can't search for any of them though (either as auditor or as a user). I'll keep working it at though.

    Thanks again.

  3. ally_wilson reporter

    In the config.php file it had:

    $config['SPHINX_DATABASE'] = 'sphinx';
    

    changed sphinx to piler and restarted apache. Seems searching now works with auditor and my 1 user.

    Probably should have added/overridden it in config-site.php.

    Wildcard searching doesn't seem to work, but I'll keep at it.

  4. Janos SUTO repo owner

    As an installation manual, I'd recommend the installation docs found at www.mailpiler.org :-) The other sources are also pretty good, but the official one relates to the actual version.

    Note that piler indexes emails in every 30 mins, so you won't see new emails instantly.

    The entry "$config['SPHINX_DATABASE'] = 'sphinx';" is just fine in the config.php, you shouldn't change it. It describes a database driver. While we have mysql, and sphinx, you definitely don't have a database driver called "piler".

    For wildcard searching you have to add an asterisk () to the searched word. Eg. by specifying "operat" (without the quotes) the gui will return emails having words like operation, operational, operating, etc. With the default sphinx.conf that piler ships you need at least 6 characters, then the asterisk character.

    If you need any further help, then let me know.

  5. ally_wilson reporter

    No, thank you. Seems to be working like a dream now.

    But just a note on the 'SPHINX_DATABASE' part, I only changed that variable, I didn't touch the one called 'SPHINX_DRIVER' (I read sphinx has it's own SphinxQL and hooks into mysql seperately - so thought it best to leave it). I assumed the 'SPHINX_DATABASE' variable was the name of the database it should be using...and if that's not the fix, then I'm even more confused!

    Thanks for your help again!

  6. Janos SUTO repo owner

    Actually sphinx doesn't feature the concept of "database". It merely provides a mysql 4.1 (or 5.1 with newer versions) compatible interface (sphinxql). So you are free to name the SPHINX_DATABASE variable, but don't change the SPHINX_DRIVER settings. Usually it's the best to leave them as they are in config.php.

  7. Log in to comment