How to authenticate POP3 with Gmail? - authentication

I'm trying to figure out how to send my credentials to Gmail. RFC5034 gives an example
S: IMPLEMENTATION BlurdyBlurp POP3 server
S: .
C: AUTH PLAIN dGVzdAB0ZXN0AHRlc3Q=
S: +OK Maildrop locked and ready
and the base64 encoded string decodes to test\0test\0test where \0 is null character.
However, if I send a base64 encoded string like that username\0user#gmail.com\0password, then I get an error message like this
-ERR [SYS/TEMP] Temporary system problem. Please try again later. df2mb862702032iec
So, these are the combinations I've tried with their outcomes:
user\0password => -ERR invalid SASL argument 42mb45977297otf
user#gmail.com\0password => -ERR invalid SASL argument uz3mb206121874obc
\0user#gmail.com\0password => -ERR [AUTH] Username and password not accepted.
\0user\0password => -ERR [AUTH] Username and password not accepted.
name\0user#gmail.com\0password => -ERR [SYS/TEMP] Temporary system problem. Please try again later. df2mb862702032iec
\0name\0user#gmail.com\0password => -ERR invalid SASL argument h184mb244881255oib
So, it looks like it should be \0user#gmail.com\0password but if I base64 encode my email and password like this:
echo -ne '\0user#gmail.com\0password' | base64
My username and password are still rejected.
So, can someone confirm the correct method of base64 encoding? Oh, and I have Pop mail activated in my settings.

And the answer is that there's a bug with Gmail. Even though with pop3 enabled on my account (of 15Gb of email), it doesn't recognise my credentials.
I have another email account with my own domain on gmail with very little mail and using the base64 version of
\0user#domain.com\0password
works just fine where \0 represents the null character.

You need to enable "less secure apps" in your GMail settings:
https://myaccount.google.com/lesssecureapps?pli=1

Related

Authentication failed clickhouse

Not able to login to clickhouse.Can any one please look into it.
root#ubuntu:~# clickhouse-client
ClickHouse client version 20.8.2.3 (official build).
Connecting to localhost:9000 as user default.
Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name.
there are 3 possible reasons:
network restriction (in CH auth for this user).
no user with such name
password is incorrect
If you just installed CH , then you can edit/remove /etc/clickhouse-server/users.d/default-password.xml . This file stores the password you entered during CH installation.
It's simple:
do not use localhost / 127.0.0.1 but use external address

mbsync authentication failed

I was able to configure mbsync and mu4e in order to use my gmail account (so far everything works fine). I am now in the process of using mu4e-context to control multiple accounts.
I cannot retrieve emails from my openmailbox account whereas I receive this error
Reading configuration file .mbsyncrc
Channel ombx
Opening master ombx-remote...
Resolving imap.ombx.io... ok
Connecting to imap.ombx.io (*.*.10*.16*:*9*)...
Opening slave ombx-local...
Connection is now encrypted
Logging in...
IMAP command 'LOGIN <user> <pass>' returned an error: NO [AUTHENTICATIONFAILED] Authentication failed.
In other posts I've seen people suggesting AuthMechs Login or PLAIN but mbsync doesn't recognizes the command. Here is my .mbsyncrc file
IMAPAccount openmailbox
Host imap.ombx.io
User user#openmailbox.org
UseIMAPS yes
# AuthMechs LOGIN
RequireSSl yes
PassCmd "echo ${PASSWORD:-$(gpg2 --no-tty -qd ~/.authinfo.gpg | sed -n 's,^machine imap.ombx.io .*password \\([^ ]*\\).*,\\1,p')}"
IMAPStore ombx-remote
Account openmailbox
MaildirStore ombx-local
Path ~/Mail/user#openmailbox.org/
Inbox ~/Mail/user#openmailbox.org/Inbox/
Channel ombx
Master :ombx-remote:
Slave :ombx-local:
# Exclude everything under the internal [Gmail] folder, except the interesting folders
Patterns *
Create Slave
Expunge Both
Sync All
SyncState *
I am using Linux Mint and my isync is version 1.1.2
Thanks in advance for any help
EDIT: I have run a debug option and I have upgraded isync to version 1.2.1
This is what the debug returned:
Reading configuration file .mbsyncrc
Channel ombx
Opening master store ombx-remote...
Resolving imap.ombx.io... ok
Connecting to imap.ombx.io (*.*.10*.16*:*9*)...
Opening slave store ombx-local...
pattern '*' (effective '*'): Path, no INBOX
got mailbox list from slave:
Connection is now encrypted
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Openmailbox is ready to
handle your requests.
Logging in...
Authenticating with SASL mechanism PLAIN...
>>> 1 AUTHENTICATE PLAIN <authdata>
1 NO [AUTHENTICATIONFAILED] Authentication failed.
IMAP command 'AUTHENTICATE PLAIN <authdata>' returned an error: NO [AUTHENTICATIONFAILED] Authentication failed.
My .msyncrc file now contains these options instead
SSLType IMAPS
SSLVersions TLSv1.2
AuthMechs PLAIN
At the end, the solution was to use the correct password. Since openmailbox uses an application password for third-party e-mail clients I was using the wrong (original) password instead of the application password.

linux curlftpfs, password with '#'

I want to mount an FTP drive, but my FTP password contains "#".
I enter the command:
curlftpfs myaccount:my#password#thefptserver.com mnt/my_ftp
But it gives me "Error connecting to ftp: Could not resolve host: password"
How do I fix this, no combination of wrapping things in '' work either they are completely ignored
curlftpfs myaccount:my%40password#thefptserver.com:/ /mnt/my_ftp ...
where %40 is hex for character # .

How to Get CouchDB Username and Password

Unfortunately I forgot what my username and password is to login to CouchDB.
Here is a similar question.
I have looked within the local.ini file at C:\Program Files (x86)\Apache Software Foundation\CouchDB\etc\couchdb
password = somepassword
username = password
However I am unable to login through lclhst :5984/_utils/index.html login.
I have also tried the config.dat file at /opt/couchbase/var/lib/couchbase/config/config.dat
Are there other places where the username or password could be? It seems there is a hierarchy of files that take precedence over each other, though I could not find this in the docs.
Thanks
Your server credentials are in the local.ini whose full path can be found using couchdb -c, in the [admins] section, but the password is hashed. It looks like this:
[admins]
username = -pbkdf2-70349775b6e7674de7fd45ff08675550046535c9,f18db0cd9fd933c0c610532e965ef1de,10
If you forgot the password, just replace the hash with your new password and restart CouchDB. It will be rehashed immediately. Example:
[admins]
username = newPassw0rd
relay from: http://silviud.blogspot.com/2012/10/couchbase-recover-web-console-password.html
(Note: top 4 lines only)
/opt/couchbase/bin/erl \
-noinput -eval \
'case file:read_file("/opt/couchbase/var/lib/couchbase/config/config.dat") of {ok, B} -> io:format("~p~n", [binary_to_term(B)]) end.' \
-run init stop | grep cred

Sendmail authentication failed [# in password]

When sendmail is configured with password that starts with the character #, authentication is failed. Sendmail throwed an error that "AUTH=client, available mechanisms do not fulfill requirements".
Is this is a known issue.?
Is that a restriction with sendmail or ssl authentication or rules parsing?
Sample default-auth-info file :-
sendmailtest#gmail.com
sendmailtest#gmail.com
#12345678
smtp.gmail.com:587
LOGIN PLAIN DIGEST-MD5 CRAM-MD5 NTLM
LINUX platform
Sendmail version : 8.14.0
sasl version : 2.1.22
Thanks in advance for the help..
It seems that readauth function in sendmail/usersmtp.c file ignores lines starting
with #.
BTW Have you considered using FEATURE(authinfo) instead of confDEF_AUTH_INFO/DefaultAuthInfo?
Anyway makemap command also by default treats # as a comment indicator but it may be changed using -D command line option.