Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I add admin user #261

Closed
forrotransfer opened this issue Apr 4, 2019 · 17 comments
Closed

How can I add admin user #261

forrotransfer opened this issue Apr 4, 2019 · 17 comments

Comments

@forrotransfer
Copy link

forrotransfer commented Apr 4, 2019

Hello,
We are using in our company postfix.admin v 2.3.6
The person who installed the application is not working any more in our co. We need to create another admin user. I attached a picture with the login screen.
May anybody help us?
Thank you for your support,

@DavidGoodwin
Copy link
Member

DavidGoodwin commented Apr 4, 2019

Hi - go to https://xxxxxxxxx/postfixadmin/setup.php - in there you can generate a new 'setup' password.

You'll see something like :

$CONF['setup_password'] = 'e92df810317434d465301dd337682d9f:e76cf263108da17bd8d74018aa0900c961ec1502';

You need to put that into the config.inc.php (perhaps) or config.local.php (better) file. That might be in somewhere like /etc/postfixadmin on the server.

Once that's done, you can use setup.php to create a new admin account (the Create superadmin account form is only shown after you've submitted the form with something in).

@forrotransfer
Copy link
Author

thank you for your response. I looked into setup.php and I did not find $CONF['setup_password'] =
Brgds,

@DavidGoodwin
Copy link
Member

sorry; i screwed up my formatting; does it make more sense now?

@forrotransfer
Copy link
Author

Sorry, but I do not understand: in setup.php i do not find the field $CONF['setup_password'] =
I must put it manually in the file setup.php?
When i try to access https://xxxxxxxxx/postfixadmin/setup.php the message is: Forbidden
You don't have permission to access /postfixadmin/setup.php on this server.
brgds,

@DavidGoodwin
Copy link
Member

Look in config.inc.php (perhaps) or config.local.php (better) file.

@forrotransfer
Copy link
Author

I found the field: $CONF['setup_password'] ='85b.........' in the config.local.php
What should I do?

@DavidGoodwin
Copy link
Member

As I said above, change it .... to a newly generated value that you know.

The setup.php page will generate a setup password for you if you from the 'Change setup password' form (just type a new one into each box and click 'Generate password hash'). This will output what you need to put in your $CONF['setup_password'] entry (along with instructions)

Then use that setup password to create a superadmin account using the form that's shown to you. In the screenshot attached I used something like 'asdf123'

postfixadmin-setup

@forrotransfer
Copy link
Author

When i try to access https://xxxxxxxxx/postfixadmin/setup.php, the result is:
Forbidden
You don't have permission to access /postfixadmin/setup.php on this server.

How can i change the password if i can not access https://xxxxxxxxx/postfixadmin/setup.php?

@DavidGoodwin
Copy link
Member

Check the web server config (and look for a .htaccess file too).

@forrotransfer
Copy link
Author

Hello ,
May I open the below issue?
Thx

@DavidGoodwin DavidGoodwin reopened this Apr 13, 2020
@DavidGoodwin
Copy link
Member

DavidGoodwin commented May 11, 2020

Sorry; I missed this.

Update your .htaccess file and change the line that currently says :

RewriteRule ^/?(README(.md) ?|INSTALL|LICENSE|CHANGELOG|UPGRADING|setup.php)$ - [F]

with

RewriteRule ^/?(README(.md) ?|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ - [F]

and you should be able to access setup.php (i.e. remove |setup.php ) from your web browser.

@forrotransfer
Copy link
Author

Hello David,
It worked. Thank you for your support

@forrotransfer forrotransfer changed the title How can I add admin user in postfix.admin How can I add admin user May 12, 2020
@ghost
Copy link

ghost commented Jun 26, 2020

what a piece of shit

@ghost
Copy link

ghost commented Jun 26, 2020

it doesn't seem to like my email address email address
image

@ghost
Copy link

ghost commented Jun 26, 2020

is there an alternative way I can not do this shit and still somehow use this php script?

@ghost
Copy link

ghost commented Jun 26, 2020

ok this is what you need to start telling people:

HOW 2 FIXX

root@postfixadmin:/var/www/html# echo "\$CONF['encrypt'] = 'md5';" >> config.inc.php 
UPDATE `admin` SET `password` = MD5('password') WHERE `admin`.`username` = 'root@localhost'; 

@DavidGoodwin
Copy link
Member

it doesn't seem to like my email address email address
image

At a guess, I would suspect your computer has problems performing DNS lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants