Web interface username & password

Questions and answers about how to do stuff
Post Reply
alkarakiomar
Posts: 6
Joined: 31 Mar 2015 09:52

Web interface username & password

Post by alkarakiomar » 31 Mar 2015 10:08

Dear All

Kindly note that i'm a new here and this is the first time that i'm using Efa, i configured the VM, and i have the root pssword, but when i try to use the web interface i cannot login.

could you please guide me that how i can login to it.

Thank you


alkarakiomar
Posts: 6
Joined: 31 Mar 2015 09:52

Re: Web interface username & password

Post by alkarakiomar » 01 Apr 2015 09:19

Hi

I follow the below link and i use the below command

/usr/bin/mysql -u mailwatch -p XXXXXXXXX mailscanner -e "UPDATE users SET password = md5('XXXXXXX') WHERE user=admin'"

but still i cannot access the web interface.

Waiting your feedback

DaN
Posts: 240
Joined: 19 Nov 2014 10:04
Location: Earth

Re: Web interface username & password

Post by DaN » 01 Apr 2015 10:54

I'm not sure, but it seems that there is no space in "-p<MailwatchPWD>".
Do you consider this?

user=admin'
should be
user='admin'"

/usr/bin/mysql -u mailwatch -pMailwatchPWD mailscanner -e "UPDATE users SET password = md5('YourNewUserPassword') WHERE user='YourUsername'"

User avatar
shawniverson
Posts: 2827
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Web interface username & password

Post by shawniverson » 01 Apr 2015 13:36

Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

alkarakiomar
Posts: 6
Joined: 31 Mar 2015 09:52

Re: Web interface username & password

Post by alkarakiomar » 05 Apr 2015 09:56

Thank you for you reply but still not working

I use the below command exactly , and I add ' before admin

/usr/bin/mysql -u mailwatch -p XXXXXXXXX mailscanner -e "UPDATE users SET password = md5('XXXXXXX') WHERE user='admin'"
but when i press Enter it will give me" the attached file "
and when I re-login to Web interface it's fail login.

Thank you for your support
Attachments
error.JPG
error.JPG (50.82 KiB) Viewed 9651 times

DaN
Posts: 240
Joined: 19 Nov 2014 10:04
Location: Earth

Re: Web interface username & password

Post by DaN » 07 Apr 2015 07:40

You still have a blank space between -p and password!?

User avatar
darky83
Site Admin
Posts: 529
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Web interface username & password

Post by darky83 » 07 Apr 2015 07:57

Please keep in mind that the username is the user you gave during the setup.

You can list your users with the command:

Code: Select all

/usr/bin/mysql -u mailwatch -p`cat /etc/EFA-Config | grep MAILWATCHSQLPWD | sed 's/.*://'` mailscanner -e "select * from users"
To reset use the mentioned reset command.

Code: Select all

/usr/bin/mysql -u mailwatch -p`cat /etc/EFA-Config | grep MAILWATCHSQLPWD | sed 's/.*://'` mailscanner -e "UPDATE users SET password = md5('YOURPASSWORD') WHERE user='YOURUSERNAME'"
and ofcourse change yourusername and yourpassword.
Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

alkarakiomar
Posts: 6
Joined: 31 Mar 2015 09:52

Re: Web interface username & password

Post by alkarakiomar » 07 Apr 2015 12:16

Dear Dark83

Kindly note that i run that command but nothing change still i cannot access the web interface.( Checked the attached file error_2).

could you please advice me , what shall i do , and as i told you that i have the root password, but my problem only when that i cann't access the web interface. ( error_3)

waitting your advice.

Thank you
Attachments
Error_3.JPG
Error_3.JPG (33.11 KiB) Viewed 9625 times
Error_2.JPG
Error_2.JPG (36.64 KiB) Viewed 9625 times

User avatar
darky83
Site Admin
Posts: 529
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Web interface username & password

Post by darky83 » 07 Apr 2015 12:53

Are you sure your username is 'admin'?

You entered the username during the initial setup, so if you entered something else then you need to use that username instead of 'admin'.

(also you forgot the backticks (`) so the command you entered does not work. :whistle: )

First try to get a list of your users with the command:

Code: Select all

/usr/bin/mysql -u mailwatch -p`cat /etc/EFA-Config | grep MAILWATCHSQLPWD | sed 's/.*://'` mailscanner -e "select * from users"
This should output atleast 1 row that contains an username.
Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

alkarakiomar
Posts: 6
Joined: 31 Mar 2015 09:52

Re: Web interface username & password

Post by alkarakiomar » 08 Apr 2015 08:34

Appreciate you support first of all.

but my friend i run the command so many times, and i got a new error ( check the attached file ).

i don't know what shall i do now,k because i fed up :)

Waiting your feedback
Attachments
error_4.JPG
error_4.JPG (34.64 KiB) Viewed 9617 times

User avatar
pdwalker
Posts: 1137
Joined: 18 Mar 2015 09:16

Re: Web interface username & password

Post by pdwalker » 08 Apr 2015 09:05

Do this first

Code: Select all

cat /etc/EFA-Config |grep SQL|grep MAILWATCHSQLPWD
You should get one line back that looks like this:
MAILWATCHSQLPWD:XXX...XXX
where XXX...XXX is your mysql password.

If you do, type in

Code: Select all

mysql -umailwatch -pXXX...XXX mailscanner
it will succeed or fail.

if it fails, do this

Code: Select all

cat /etc/EFA-Config |grep SQL|grep MYSQLROOTPWD
You should get back a line like
MYSQLROOTPWD:YYY....YYY
where YYY...YYY is your mysql root password.

if you do, type in

Code: Select all

mysql -uroot -pYYY...YYY mailscanner
If either mysql command works and you are connected to the database, type in this

Code: Select all

select * from users;
post those results

Warning: do not post your passwords. We only need the results of the final query, or the results from the mysql command if they both failed.

User avatar
darky83
Site Admin
Posts: 529
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Web interface username & password

Post by darky83 » 08 Apr 2015 09:56

Hi alkarakiomar

Try the methode pdwalker mentioned,

Looking at the screenshots you have some of the quotes wrong so it is not working the line should be:

Code: Select all

/usr/bin/mysql -u mailwatch -p`cat /etc/EFA-Config | grep MAILWATCHSQLPWD | sed 's/.*://'` mailscanner -e "select * from users"
Note after the -p it should be a backtick not a quote, same for the last one for mailscanner that is a backtick not a single quote :)
But try the way pdwalker mentioned, that way you don't have to use the longer command.
Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

alkarakiomar
Posts: 6
Joined: 31 Mar 2015 09:52

Re: Web interface username & password

Post by alkarakiomar » 08 Apr 2015 15:42

Hi Dark83
hope you are fine and everything is under control not like me :)

Please find the attached file ( error_5 :) ),

i follow all your steps but still it fail

Best regards,
Attachments
error_5.JPG
error_5.JPG (92.96 KiB) Viewed 9611 times


User avatar
darky83
Site Admin
Posts: 529
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Web interface username & password

Post by darky83 » 09 Apr 2015 06:55

Yup I see a whole lot of typing mistakes, make sure it is exactly as mentioned above.
Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

User avatar
pdwalker
Posts: 1137
Joined: 18 Mar 2015 09:16

Re: Web interface username & password

Post by pdwalker » 09 Apr 2015 07:57

yeah, until you get the commands typed in properly, it's hard to go forward.

use the commands as I've written them. It'll take a few more steps, but there are fewer changes to make a mistake.

anti-spam
Posts: 40
Joined: 06 Oct 2015 14:32
Contact:

Re: Web interface username & password

Post by anti-spam » 10 Apr 2019 17:45

Hi,

i have to change the administrator's password, did a try with the command below, but i always receive a error message :

[root@mx2 ~]# /usr/bin/mysql -u mailwatch -p`cat /etc/EFA-Config | grep MAILWATCHSQLPWD | sed 's/.*://'` mailscanner -e "UPDATE users SET password = md5('my-new-password') WHERE user='adminefa'"
ERROR 1054 (42S22) at line 1: Unknown column 'user' in 'where clause'

Is there a other way to change this password ?
Thanks
Best regards
:arrow: always fighting spams ... :hand:

henk
Posts: 387
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: Web interface username & password

Post by henk » 10 Apr 2019 18:24

the fieldname is username and not user

Code: Select all

select username, password from mailscanner.users;
+-------------------+-----------------------------+
| username | password |
+-------------------+-----------------------------+
| titi | $some password |
| tata@testdomain | $another password |

anti-spam
Posts: 40
Joined: 06 Oct 2015 14:32
Contact:

Re: Web interface username & password

Post by anti-spam » 12 Apr 2019 12:39

hi,

i'm sorry, but i'm not able to find how to change this password...
It's urgent, as we HAVE to change it a.s.a.p., as someone else have this password ... :(
Thanks
:arrow: always fighting spams ... :hand:

henk
Posts: 387
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: Web interface username & password

Post by henk » 12 Apr 2019 22:59

show users and passwd's

Code: Select all

mysql -u root -p`cat /etc/EFA-Config | grep MYSQLROOTPWD | sed 's/.*://'` mailscanner -e "Select username, password from users"
update password for username: adminefa

Code: Select all

/usr/bin/mysql -u root -p`cat /etc/EFA-Config | grep MYSQLROOTPWD | sed 's/.*://'` mailscanner -e "UPDATE users SET password = PASSWORD('mysecretpassword') WHERE username ='adminefa'"
TIP.
If you login to mysql -> use mailscanner; -> the update query is much easier. By creating a .my.cnf in your root directory , you can even login without typing (or grepping) passwords.

anti-spam
Posts: 40
Joined: 06 Oct 2015 14:32
Contact:

Re: Web interface username & password

Post by anti-spam » 14 Apr 2019 09:59

Hi,

i did a try with

/usr/bin/mysql -u root -p`cat /etc/EFA-Config | grep MYSQLROOTPWD | sed 's/.*://'` mailscanner -e "UPDATE users SET password = PASSWORD('mysecretpassword') WHERE username ='adminefa'"

and now i'm haning with : Bad Username or Password
The password is changed, because the show command show me a other and shorter crypted password ...
Is there a other way, to reset it to the original password ?
:arrow: always fighting spams ... :hand:

henk
Posts: 387
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: Web interface username & password

Post by henk » 14 Apr 2019 11:08

did the test, to be sure.

Create user tempadm with password dirkjan

Code: Select all

/usr/bin/mysql -u mailwatch -p`cat /etc/EFA-Config | grep MAILWATCHSQLPWD | sed 's/.*://'` mailscanner -e "INSERT INTO users SET username = 'tempadm', password = MD5('<dirkjan>'), fullname = 'tempadm', type ='A'"
Check if user is created ( and show the md5 pwd for 'dirkjan' )

Code: Select all

mysql -u root -p`cat /etc/EFA-Config | grep MYSQLROOTPWD | sed 's/.*://'` mailscanner -e "Select username, password,  MD5('dirkjan') as pwd  from users"
To update a password for user tempadm

Code: Select all

/usr/bin/mysql -u mailwatch -p`cat /etc/EFA-Config | grep MAILWATCHSQLPWD | sed 's/.*://'` mailscanner -e "UPDATE users SET password = MD5('dirkjan') WHERE username = 'tempadm'"
After the first time login the password changes in the db.

Check to see the difference

Code: Select all

mysql -u root -p`cat /etc/EFA-Config | grep MYSQLROOTPWD | sed 's/.*://'` mailscanner -e "Select username, password,  MD5('dirkjan') as pwd  from users"

Via Tools and link-> User Management you can change passwords (as user tempadm with password dirkjan is not a secret anymore :idea: )

anti-spam
Posts: 40
Joined: 06 Oct 2015 14:32
Contact:

Re: Web interface username & password

Post by anti-spam » 14 Apr 2019 11:45

:angry-banghead: :angry-banghead: :angry-banghead:

I was on that Tools and links, but i was to stupid to don't read the first line, User Managemant ...
I only did a search on "password" .... :violence-axechase:

I will have to learn to read more.
MANY thanks for your help.
Best regards
:arrow: always fighting spams ... :hand:

Post Reply