Topic: Password not working for new company(1)

hi All

I have created a new company, my first company works correctly and I can logon to the first company(0). The default "password" does not work for my new company. I get the following errors
"Incorrect Password
The user and password combination is not valid for the system.
If you are not an authorized user, please contact your system administrator to obtain an account to enable you to use the system."


I have checked the users table and the md5 has is 5f4dcc3b5aa765d61d8327deb882cf99, I have enabled the debug and the sql statements in the footer and I have not been able to get any more details. I have also copied the md5 has from company 0 to company 1 and the company 0 password does not work either

Any suggestions?


Diagnostics attached

Test     Test type     Value     Comments
MySQL version >=4.1     Required     10.3.7-MariaDB     Ok
PHP version >=5.0.0     Required     5.6.39     Ok
Http server type     Info     Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141     Ok
Server system     Info     Linux     Ok
Browser type     Info     Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0     Ok
Native gettext     Optional     Yes     Ok
Debugging mode     Info     Yes     Ok
Error logging     Recommended     ../tmp/errors.log     Ok
Current database version     Required     2.4.1     Ok
Company subdirectories consistency     Required     ../company/0/*
../company/0/*/images
../company/0/*/pdf_files
../company/0/*/backup
../company/0/*/js_cache     Ok
Language configuration consistency     Required     en_AU
en_US
en_ZA     Missing system locale: en_AU.iso-8859-1
Missing system locale: en_US.iso-8859-1
Missing system locale: en_ZA.iso-8859-1
Temporary directory     Required     ../tmp     Ok
Session save path     Info     /var/services/tmp     Ok

Re: Password not working for new company(1)

Logout
Clear browser cache
Close all instances of the browser
Login

List the contents of the users table.
Check if the IP Hijack code is causing issues with your PHP version.

Your diagnostics are for company 0 - list it for the company 1 or whichever failed.

Re: Password not working for new company(1)

Comments below
"Logout
Clear browser cache
Close all instances of the browser
Login"

For the first item, I tried connecting using a different computer and browser that has not connected to FrontAcc before and it resulted in the same issue

"List the contents of the users table."

id    user_id    password    real_name    role_id    phone    email    language    date_format    date_sep    tho_sep    dec_sep    theme    page_size    prices_dec    qty_dec    rates_dec    percent_dec    show_gl    show_codes    show_hints    last_visit_date    query_size    graphic_links    pos    print_profile    rep_popup    sticky_doc_date    startup_tab    transaction_days    save_report_selections    use_date_picker    def_print_destination    def_print_orientation    inactive   
1    admin    5f4dcc3b5aa765d61d8327deb882cf99    Administrator    2        adm@adm.com    en_US    1    0    0    0    default    Letter    2    2    4    1    1    0    0    2009-06-24 20:28:10    10    1    1        1    0    orders    30    0    1    0    0    0   
2    demouser    5f4dcc3b5aa765d61d8327deb882cf99    Demo User    2       
    NULL
    en_US    1    0    0    0    default    Letter    2    2    4    1    1    0    0    2009-06-24 17:39:42    10    1    1        1    0    orders    30    0    1    0    0    0   

"Check if the IP Hijack code is causing issues with your PHP version." I don't understand how to do this I could not find anything useful on Google, can you please point me in the correct direction?

"Your diagnostics are for company 0 - list it for the company 1 or whichever failed. " Can only provide diagnostics for Company 0, I cannot logon to company 1 to provide you with the diagnostics for company 1.

Thanks you very much for your reply
Wayne

Re: Password not working for new company(1)

Users table in CSV format

"id","user_id","password","real_name","role_id","phone","email","language","date_format","date_sep","tho_sep","dec_sep","theme","page_size","prices_dec","qty_dec","rates_dec","percent_dec","show_gl","show_codes","show_hints","last_visit_date","query_size","graphic_links","pos    print_profile","rep_popup","sticky_doc_date    startup_tab","transaction_days","save_report_selections","use_date_picker","def_print_destination","def_print_orientation","inactive"
"1","admin","5f4dcc3b5aa765d61d8327deb882cf99","Administrator","2",,"adm@adm.com","en_US","1","0","0","0","default","Letter","2","2","4","1","1","0","0","2009-06-24 20:28:10","10","1","1",,"1","0","orders","30","0","1","0","0","0"
"2","demouser","5f4dcc3b5aa765d61d8327deb882cf99","Demo User","2",,NULL,"en_US","1","0","0","0","default","Letter","2","2","4","1","1","0","0","2009-06-24 17:39:42","10","1","1",,"1","0","orders","30","0","1","0","0","0"

Re: Password not working for new company(1)

The users db seems okay.

Even though you could not log into the company 1, the errors would still be available in the tmp/*.logs files as well as the apache error logs at /var/log/....

The key error that appears is the lack of the en_AU locale from:
"Missing system locale: en_AU.iso-8859-1"
that the chart wants.

On a fresh install of FA 2.4.6+ Git Master code base, create company 0 and company 1 using the en_US-new and demo sql files as the chart of accounts.

Set the default "C" or en_US language locales to start with - do not make any changes for the Australian locale now.

Now see if you can login to both companies.

If all goes well, then install the en_AU locale in the server OS and then reboot the server for good measure and try with en_AU chart of accounts drawn from the FA24extensions repo - the official chart may not have been updated as yet.

The IP Hijacking code is listed in the wiki and referred to in a few posts in the forum but that addresses a connectivity recognition issue that may mostly not be directly relevant here.

The use of the bleeding edge MariaDB may have issues with FA's use of zero dates where strict date mode may need to be switched off. Assume you are using Ubuntu 18.04.

Re: Password not working for new company(1)

Hi apmuthu

After some troubleshooting I found that the 1_security_roles table was blank and I copied all the contents from 0_security_roles to 1_security_roles

INSERT INTO 1_security_roles
SELECT *
FROM 0_security_roles

I am able to login to the second company

thanks
Wayne

Re: Password not working for new company(1)

You used the same database for the second company. Wonder how the admin user record did not get created in it's users table.

Re: Password not working for new company(1)

Hi

It was the same database, the admin user record was created, the security roles were not created for the second company

9 (edited by pankajawasthi99 04/18/2020 01:41:58 pm)

Re: Password not working for new company(1)

1. The System Administrator user created for the first time  - must be able to login to very first company. Company "0"
2. The default admin user is admin/password.
3. Each subsequent company created, thus, will have its own admin user with default password.
4. For each company the users must be managed separately, along with their respective passwords.