Can't login (as admin anymore)

Support requests, bug reports, questions etc.

Can't login (as admin anymore)

Postby rainer_d » Thu Jun 11, 2009 12:15

Maybe related to my other problem.

In config/authentication.php, I still have:

define('AUTH_ENABLED', '1');
#
define('AUTH_TYPE', 'file');

but I can't login to the webgui anymore.
It says I should use my file-password, but it doesn't work anymore.

How could I debug this?


Best Regards,
Rainer
rainer_d
beginner
beginner
 
Posts: 5
Joined: Wed Jun 10, 2009 20:11

Re: Can't login (as admin anymore)

Postby agargiulo » Thu Jun 11, 2009 12:49

Note that in version 1.2.5 we have changed the delimiter to "::" (2 colons). The documentation is already updated, but if you are using NConf 1.2.4. try using the old delimiter ":" (1 colon)
User avatar
agargiulo
NConf developer
NConf developer
 
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland

Re: Can't login (as admin anymore)

Postby fgander » Thu Jun 11, 2009 13:26

i have to correct this,
in version 1.2.4 it was a "," which seperates the fields.

Your problem could be, that you have used a ","(comma) in the username or password... this will fail your login...

-> please correct your config/.file_accounts by open it with an editor

the new version 1.2.5 will handle this better with "::" as delimiter !

regards fabian
F.G. - NConf developer
http://www.nconf.org
Image
Follow NConf on Twitter!
User avatar
fgander
NConf developer
NConf developer
 
Posts: 308
Joined: Mon Mar 16, 2009 14:23
Location: Bern, Switzerland

Re: Can't login (as admin anymore)

Postby rainer_d » Fri Jun 12, 2009 01:30

Hi,

neither my username nor my password contain a comma.

srv3# cat .file_accounts
#
# User/Password File for simple access
# To disable a user, rows can be commented out with "#"
#
#loginname,password,autorisation(user|admin),[user's full name (optional)]
admin,heres_the_pass,admin,Administrator
#user,1234,user,Normal User
#dummy,9999,user,User Dummy
#foo,bar,user,foo bar



Best Regards,
Rainer
rainer_d
beginner
beginner
 
Posts: 5
Joined: Wed Jun 10, 2009 20:11

Re: Can't login (as admin anymore)

Postby fgander » Fri Jun 12, 2009 09:31

that should be fine.

try using not special chars.. perhaps this helps
or have a look if the file is readable for your apache...

otherwise i do not know where the problem could be...

regards fabian
F.G. - NConf developer
http://www.nconf.org
Image
Follow NConf on Twitter!
User avatar
fgander
NConf developer
NConf developer
 
Posts: 308
Joined: Mon Mar 16, 2009 14:23
Location: Bern, Switzerland

Re: Can't login (as admin anymore)

Postby agargiulo » Fri Jun 12, 2009 12:04

If you enable password encryption in NConf, you have to make sure the encryption type of your passwords matches the one you use in your file_accounts file.
The PASSWD_ENC option is global: it defines how NConf handles passwords and is used during authentication, and also for when NConf stores passwords in the database.
In another thread you were saying that you had problems with passwords not being encrypted. There is a good chance that this is the reason why you cannot authenticate. If you set the encryption type to "crypt", NConf will try to use the crypt() function everytime it handles passwords.

Check the following:
- make sure your PHP crypt() function works properly. For this, PHP must have been compiled with the "--mcrypt" option, or your PHP version has to be 5.3 or higher. To test this you can do the following on the commandline:
Code: Select all
$> php -r "echo '{CRYPT}'.crypt('nconf','xx');"
{CRYPT}xxBX77qmM0duQ


- make sure the passwords you are using in your file_accounts file are encrypted with crypt:
Code: Select all
NConf 1.2.4: config/.file_accounts
admin,{CRYPT}xxBX77qmM0duQ,admin,Administrator


Code: Select all
NConf 1.2.5: config/.file_accounts.php
admin::{CRYPT}xxBX77qmM0duQ::admin::Administrator::
User avatar
agargiulo
NConf developer
NConf developer
 
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland

Re: Can't login (as admin anymore)

Postby rainer_d » Fri Jun 12, 2009 17:36

Ah, OK.
Now I understand.

It was still clear-text.
After picking the right salt, pasting correctly I can now login again.

But the question remains why it still exports cleartext-passwords.


But thanks anyway, so far.


Best Regards,
Rainer
rainer_d
beginner
beginner
 
Posts: 5
Joined: Wed Jun 10, 2009 20:11


Return to Support (NConf 1.2.4)

Who is online

Users browsing this forum: No registered users and 1 guest

cron