Imap login error (UID issue?)

elbarto

Verified User
Joined
Oct 8, 2008
Messages
134
Hey guys, I'm having a problem with a fresh install of directadmin.

When I try to login I get the error "internal login failure".
(I'm changing the domain and user's data for privacy. Also I changed the IP address for 255.255.255.255)

Code:
elbarto@tarantino:~$ nc mydomain.net 143
1* OK Dovecot DA ready.
1 login [email protected] mypasswd
* BYE Internal login failure. Refer to server log for more information.

So, I set up Dovecot for logging and check the log and this is what I get.
Code:
dovecot: Oct 08 18:09:44 Info: auth(default): shadow([email protected],255.255.255.255): unknown user
dovecot: Oct 08 18:09:44 Info: auth(default): passwd([email protected], 255.255.255.255): unknown user
dovecot: Oct 08 18:09:44 Error: User [email protected] is missing UID (set mail_uid)
dovecot: Oct 08 18:09:44 Info: imap-login: Internal login failure (auth failed, 1 attempts): user=<[email protected]>, method=PLAIN, rip=255.255.255.255, lip=255.255.255.254

I searched the web for a while and guess the problem could be con my passwd file, here is what I got:

Code:
[root@myserver ~]# cat /etc/virtual/mydomain.net/passwd 
myuser:$1$fE0bzn7C$66MfTD1nnyuuNup6Dm5yA/

My guess is that UID and GID are missing on that file, but as it was created by DA, I guess there would be some configuration error somewhere.

Can you give me a hand?

Thanks in advance!
 
I did some more testing.

I tried modifying the passwd file and put something like this:

Code:
myuser:$1$fE0bzn7C$66MfTD1nnyuuNup6Dm5yA/:500:12::/home/myuser/mydomain.net/Maildir:/bin/false

And it worked. Now I think there's a problem when creating a new e-mail account from DA. Should DA create the record at /etc/virtual/<domain>/passwd with the corresponding UID and GID? If so, which could be the reason for not doing it? Any ideas?

Thanks!
 
Correction, I had to change it again because the MailDir path was wrong. This one seems to work:

Code:
myuser:$1$fE0bzn7C$66MfTD1nnyuuNup6Dm5yA/:500:12::/home/user/imap/mydomain.net/myuser/Maildir:/bin/false
 
Presuming you've modified the file at /etc/passwd ...

If you're storing passwords in /etc/passwd you may have a security issue on your server, especially if you use insecure passwords.

Also ... now that you've exposed the hash for that user's passoword it's no longer a secure password; you should change it.

Jeff
 
1 - What I've posted it's not /etc/passwd, is /etc/virtual/mydomain/passwd. Besides, additional security measures for not allowing common users login are being taken.

2 - "myuser" doesn't actually exist, but anyway the hash belongs to a test user which does not longer exist

Now, back to my problem, do you know why DA is creating users without the UID and GID, which causes that none of them can login via IMAP or POP3?

Maybe it has nothing to do with /etc/virtual/mydomain/passwd, but modifying that file seemed to do the trick.
 
I have no idea why it's not working on your system; perhaps you should have DirectAdmin Support take a look at your system.

Jeff
 
Ok, thanks anyway.
I'll try to contact the person who originally installed DA on my system.
 
Not so far, but if you get any further, it would be great that you share it.
Regards
 
Hello,

Just as a followup (since no solution was posted) the reason that services like squirrelmail often cannot connect to imap is because the line:
Code:
127.0.0.1  localhost
is missing from the /etc/hosts file.

Simply adding that line to the /etc/hosts file can sort that out.
I think I'll just add a check for that in the setup.sh so nobody needs to worry about it anymore (for new installs).

John
 
Same problem here.

Has anyone found a solution to this yet? Seems to be a lot of people with this problem.
 
Please post the specific problem. Include any error messages.

Post also your main IP#.

Thanks.

Jeff
 

If you look closely, the error in this is not the same as the error we are getting. Plus, as I have said in my other post, I've already tried that anyway.

We are not getting a UID=1.

dovecot=1 is in the config.

If you look at the errors in our logs it says the UID is missing. It does not say the UID is set to 1.

It would appear that when DirectAdmin is creating the virtual email accounts, it is missing the UID information that dovecot is looking for.
 
If you've emailed me, then I don't see the email. Did you email me at the address shown in my siglines? What was the subject line?

Jeff
 
If you've emailed me, then I don't see the email. Did you email me at the address shown in my siglines? What was the subject line?

Jeff

Email sent to email in your siglines from my gmail account with subject: I'm the person with the email login problem.
 
Back
Top