access to /admin/ directory

  • Georgi Naplatanov

    Hello, i downloaded trunk from the svn repository and i can't access /admin/ directory. Every time php redirect browser to /login.php.
    I use Debian 4.0 (Etch), apache 2.2.3, php 5.2.0 and postgresql 8.1.

    Is svn trunk usable or under heavy development ?

    Best regards
    Georgi Naplatanov

    • Greg C

      Greg C - 2007-06-21

      /admin directory scripts are used by superadmins.  When you log in as a superadmin you'll be running scripts from /admin that won't bother checking to see if you are allowed to admin for a domain.  login.php sorts out what type of admin you are and sends you to the right place.  The scripts in / are used by domain admins and always check to see if you are an admin for the domain (or user within a domain) you are attempting to change.  End user scripts only do operations on the currently logged in user.

      I have made some updates this week and may do a little more on Thursday and Friday, after that I won't be touching it for a while (going on vacation for about 3 weeks).  So far I have made the autoresponse and search capabilities more usable, and I've applied some of the patches posted on SourceForge. 


    • Johan Hendriks

      Johan Hendriks - 2007-06-21

      I have updated my 2.1.0 test site to the latest svn, and also get redirected to the frontpage now.

      The problem now is i do not have a superadmin created yet in the database.
      How do i create the admin user in the old 2.1.0 database? so i can use it to create more domains and domain admins.


    • Greg C

      Greg C - 2007-06-21

      The database scripts DATABASE_MYSQL.TXT and DATABASE_PGSQL.TXT create a super admin of admin@domain.tld, password: admin

      With that login you can create new superadmins (and you should delete or change the passwrod of
      admin@domain.tld).  If that user is no longer there or you didn't use the .TXT files, you could add another manually from the database.  Just use the code from one of the .TXT files.  I did this as root on the MySQL machine:

      # mysql
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 8186 to server version: 5.0.27

      Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

      mysql> use postfix
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A

      Database changed
      mysql> INSERT INTO domain_admins (username, domain, active) VALUES ('new@domain.tld','ALL','1');
      Query OK, 1 row affected (0.00 sec)

      mysql> INSERT INTO admin (username, password, active) VALUES ('new@domain.tld','$1$0fec9189$bgI6ncWrldPOsXnkUBIjl1','1');
      Query OK, 1 row affected (0.00 sec)

      mysql> exit

      Then you can log in as new@domain.tld, password: admin


Log in to post a comment.