[REQUEST] Email alerts of drive failure conditions

Re: [REQUEST] Email alerts of drive failure conditions

Postby hvymetal86 » Thu Aug 17, 2017 5:44 pm

So I changed the account password to something using only lowercase letters and 11 characters long, updated it in the NAS settings, then sent a test email and received it successfully. I didn't get a notification for an insecure app nor is there one listed in the approved section...

The password on my gmail account that I used initially (with the insecure apps option off) has a 32 character password. Now I'm not sure if its a combination of the two or just the password length having an issue over 31 characters. I will have to do more testing it appears.
hvymetal86
Donator VIP
Donator VIP
 
Posts: 121
Joined: Mon May 11, 2015 3:42 pm

Re: [REQUEST] Email alerts of drive failure conditions

Postby hvymetal86 » Thu Aug 17, 2017 6:00 pm

Just turned insecure apps option off on new nas notification email account and it still sent without an issue. I then changed the password again to something 16 characters long using lower and upper case letters and numbers (but not symbols). Now the test emails are no longer getting through. Shortened it to 11 characters but still containing upper/lower/numbers and re-tested... still no email.

I tried to change it back to the password that was working but wasn't allowed by google so I reverted it back to that but with the word order switched, then noticed an email in my recovery account about an insecure app, turned that feature back on, and got the email again.

So I have so far confirmed that the insecure apps feature MUST be on... BUT turning it off in google's control panel may have a few minutes delay in actually turning it off. I'm still not sure how the password length or content affects this. Still testing.
hvymetal86
Donator VIP
Donator VIP
 
Posts: 121
Joined: Mon May 11, 2015 3:42 pm

Re: [REQUEST] Email alerts of drive failure conditions

Postby Jocko » Thu Aug 17, 2017 6:23 pm

Hi,

hvymetal86 wrote:I have so far confirmed that the insecure apps feature MUST be on
Yes I confirm that.

You must have somewhere a post sent by google like this
Examine the blocked connection attempt
Hello XXXXX,
We have just blocked an attempt to sign in to your Google Account xxxxxxx@gmail.com from an application that is at risk for it.
Less secure application
Sunday 13 August 2017, 16:00 (UTC)
Do you recognize this activity?
If you have not recently received an error message when trying to access a Google service (such as Gmail) from an application other than Google, it is possible that someone else has access to your word Password.

SECURE YOUR ACCOUNT

Are you the person who tried to connect?
We will continue to block attempts to sign in to your account from the application you are using because it has security issues or is outdated. You can continue to use this application by granting access to less secure applications, but this can make your account vulnerable.

The Google Accounts team
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: [REQUEST] Email alerts of drive failure conditions

Postby hvymetal86 » Thu Aug 17, 2017 6:26 pm

Yes, I did get an email similar to that. Once I turned it back on it was working again. In further testing of password limitations:
Changed password to 16 characters length with random upper/lower/numbers & re-test was successful.
Changed password to 32 characters length with random upper/lower/numbers & re-test failed.
Changed password to 25 characters length with random upper/lower/numbers & re-test was successful.
Changed password to 29 characters length with random upper/lower/numbers & re-test failed.
Changed password to 28 characters length with random upper/lower/numbers & re-test failed.
Changed password to 27 characters length with random upper/lower/numbers & re-test was successful.

So it appears there is a limit of 27 characters for the password. I highly doubt this is on Google's side as I can log into the account fine in my web browser even up to 64 characters and will each shorter password I tested.

As I normally like the strongest password possible I reintroduced symbols into the mix at the 27 character length:
Changed password to 27 characters length with random upper/lower/numbers/characters, characters used were #, %, and $, re-test failed.

So it looks like at least some characters mess it up regardless of length as well. Before I go through testing all types of characters, do you have any insight as to which characters in a password might cause issues for the NAS OS or openssl?
hvymetal86
Donator VIP
Donator VIP
 
Posts: 121
Joined: Mon May 11, 2015 3:42 pm

Re: [REQUEST] Email alerts of drive failure conditions

Postby Jocko » Thu Aug 17, 2017 6:31 pm

hvymetal86 wrote:As I normally like the strongest password possible I reintroduced symbols into the mix at the 27 character length:
Changed password to 27 characters length with random upper/lower/numbers/characters, characters used were #, %, and $, re-test failed.
Yes some chars are used by shell in a string like : $ or % or '${' or '$('

So you can try to escape them by adding a '\' so '$' => '\$'
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: [REQUEST] Email alerts of drive failure conditions

Postby hvymetal86 » Thu Aug 17, 2017 9:58 pm

I tried avoiding $ or % since they're used by the shell and tried instead using the symbols @, !, and * but still ran into problems.

In further testing I found that the following symbols work with no issues and without needing to escape them:
@
!
-
+
=

If I click the NAS password after entering it and clicking accept, I could see that for some characters it added the escape character itself but in testing that still didn't work.

All of the following symbols break it:
#
$
%
^
&
*

I've settled on a 27 character password using only some of the symbols found to work in testing.
hvymetal86
Donator VIP
Donator VIP
 
Posts: 121
Joined: Mon May 11, 2015 3:42 pm

Re: [REQUEST] Email alerts of drive failure conditions

Postby Jocko » Fri Aug 18, 2017 8:51 am

Thank you for the feedback.

I think to go to add this information about gmail account in the help page of Notification menu.

So if you want to try the email warning on raid event you can manually declare a faulty disk : after you will need to remove it (sefely remove) from the raid (edit volume menu) and re-add it (safely add)
check if your raid has a clean status (I assume it is the md0 device)
Code: Select all
root@Acrab:/ # mdadm --detail /dev/md0
/dev/md0:
        Version : 1.0
  Creation Time : Wed Dec  3 14:40:52 2014
     Raid Level : raid5
     Array Size : 11709457408 (11167.01 GiB 11990.48 GB)
  Used Dev Size : 2927364352 (2791.75 GiB 2997.62 GB)
   Raid Devices : 5
  Total Devices : 5
    Persistence : Superblock is persistent

   ...

    Number   Major   Minor   RaidDevice State
       0       8       24        0      active sync   /dev/sdb8
       4       8        8        1      active sync   /dev/sdc8
       3       8       56        2      active sync   /dev/sde8
       5       8       40        3      active sync   /dev/sda8
       6       8       72        4      active sync   /dev/sdd8
Then declare sdd8 as a faulty disk
Code: Select all
root@Acrab:/ # mdadm /dev/md0 -f /dev/sdd8
mdadm: set /dev/sdd8 faulty in /dev/md0
So check if you receive a message" Subject: Fail event on /dev/md0:your nasname.local"
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: [REQUEST] Email alerts of drive failure conditions

Postby Jocko » Sat Nov 25, 2017 4:14 pm

Hi Hvymetal,

There was a bug on the mail script which broke authentication if the password (or login) was too length.

With the last patch viewtopic.php?f=7&t=2695&p=25944#p2594, all special character is escaping and can be used with the password
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 13 guests