File permission and can't login

BaGRoS

Verified User
Joined
May 5, 2008
Messages
13
I set permission for /home/admin/ ->
admin:admin
and can't login on
squirrelmail/src/login.php
always:
ERROR
Unknown user or password incorrect.
Go to the login page

login:password is 100% correct!!
How I can fix permission for all directories?
 
Code:
cd /usr/local/directadmin/scripts
./set_permissions.sh all
 
Jul 4 16:47:24 &&&&&&&& dovecot[22314]: Killed with signal 15
Jul 4 16:56:28 &&&&&&&& dovecot[2992]: Dovecot v1.0.14 starting up
Jul 4 17:00:04 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:02:24 &&&&&&&& dovecot[2992]: auth(default): shadow(#####@%%%%%%.pl,127.0.0.1): unknown user
Jul 4 17:02:24 &&&&&&&& dovecot[2992]: auth(default): passwd-file(#####@%%%%%%.pl,127.0.0.1): no passwd file: username_format=##### /etc/virtual/%%%%%%.pl/passwd
Jul 4 17:02:26 &&&&&&&& dovecot[2992]: imap-login: Aborted login (1 authentication attempts): user=<#####@%%%%%%.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 4 17:02:59 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:05:58 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:08:53 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:15:51 &&&&&&&& dovecot[2992]: auth(default): shadow(#####@%%%%%%.pl,127.0.0.1): unknown user
Jul 4 17:15:51 &&&&&&&& dovecot[2992]: auth(default): passwd-file(#####@%%%%%%.pl,127.0.0.1): no passwd file: username_format=##### /etc/virtual/%%%%%%.pl/passwd
Jul 4 17:15:52 &&&&&&&& dovecot[2992]: imap-login: Aborted login (1 authentication attempts): user=<#####@%%%%%%.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 4 17:17:56 &&&&&&&& dovecot[2992]: auth(default): shadow(******@******.pl,127.0.0.1): unknown user
Jul 4 17:17:56 &&&&&&&& dovecot[2992]: auth(default): passwd-file(******@******.pl,127.0.0.1): no passwd file: username_format=****** /etc/virtual/******.pl/passwd
Jul 4 17:17:58 &&&&&&&& dovecot[2992]: imap-login: Aborted login (1 authentication attempts): user=<******@******.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 4 17:30:51 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:33:57 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:36:58 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:40:04 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:42:59 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:45:54 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:50:22 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:53:17 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:56:13 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 17:56:17 &&&&&&&& dovecot[2992]: auth(default): shadow(#####@%%%%%%.pl,oo.oo.ooo.oo): unknown user
Jul 4 17:56:17 &&&&&&&& dovecot[2992]: auth(default): passwd-file(#####@%%%%%%.pl,oo.oo.ooo.oo): no passwd file: username_format=##### /etc/virtual/%%%%%%.pl/passwd
Jul 4 17:56:21 &&&&&&&& dovecot[2992]: auth(default): shadow(#####@%%%%%%.pl,oo.oo.ooo.oo): unknown user
Jul 4 17:56:21 &&&&&&&& dovecot[2992]: auth(default): passwd-file(#####@%%%%%%.pl,oo.oo.ooo.oo): no passwd file: username_format=##### /etc/virtual/%%%%%%.pl/passwd
Jul 4 17:56:24 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: user=<#####@%%%%%%.pl>, method=PLAIN, rip=oo.oo.ooo.oo, lip=oo.OOO.ooo.OO
Jul 4 17:57:17 &&&&&&&& dovecot[2992]: auth(default): shadow(#####@%%%%%%.pl,oo.oo.ooo.oo): unknown user
Jul 4 17:57:17 &&&&&&&& dovecot[2992]: auth(default): passwd-file(#####@%%%%%%.pl,oo.oo.ooo.oo): no passwd file: username_format=##### /etc/virtual/%%%%%%.pl/passwd
Jul 4 17:57:21 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: user=<#####@%%%%%%.pl>, method=PLAIN, rip=oo.oo.ooo.oo, lip=oo.OOO.ooo.OO
Jul 4 17:58:17 &&&&&&&& dovecot[2992]: auth(default): shadow(#####@%%%%%%.pl,oo.oo.ooo.oo): unknown user
Jul 4 17:58:17 &&&&&&&& dovecot[2992]: auth(default): passwd-file(#####@%%%%%%.pl,oo.oo.ooo.oo): no passwd file: username_format=##### /etc/virtual/%%%%%%.pl/passwd
Jul 4 17:59:08 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 18:01:17 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: Inactivity: user=<#####@%%%%%%.pl>, method=PLAIN, rip=oo.oo.ooo.oo, lip=oo.OOO.ooo.OO
Jul 4 18:02:03 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 18:04:59 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 18:07:54 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 18:10:49 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO
Jul 4 18:13:44 &&&&&&&& dovecot[2992]: pop3-login: Disconnected: rip=OO.ooo.OO.ooo, lip=oo.OOO.ooo.OO

i change IP, login, domain...
this isn't important
 
I'm getting the exact same problem after converting from mbox to dovecot tonight.

Jul 6 00:17:56 orion dovecot[5072]: auth(default): shadow([email protected],123.45.67.89): unknown user
Jul 6 00:17:56 orion dovecot[5072]: auth(default): passwd-file([email protected],123.45.67.89): no passwd file: username_format=me /etc/virtual/mydomain.com/passwd

the /etc/virtual/mydomain.com/passwd file exists, mail:mail 600, and is certainly readable by the 'root' user as specified in the auth secion of dovecot.conf (default .conf file btw as installed by DA).

All '[email protected]' users (virtual email users) fail auth, for all domains on the box. Changing the password doesn't make a difference. The 'local' unix users pass auth fine.

DA version = 1.32.1 (customapache), CentOS 5.2.
The dovecot guide I followed was this one: http://www.directadmin.com/features.php?id=590

Any help would be IMMENSELY appreciated... even if it means reverting back to the old mbox somehow, as this is a production box! :(
 
Last edited:
and here's some more info with the auth debugging turned on in dovecot.conf

Jul 6 00:37:24 orion dovecot[7304]: auth(default): client in: AUTH 2 PLAIN service=IMAP lip=1.2.3.4 rip=123.45.67.89 resp=<hidden>
Jul 6 00:37:24 orion dovecot[7304]: auth(default): shadow([email protected],123.45.67.89): lookup
Jul 6 00:37:24 orion dovecot[7304]: auth(default): shadow([email protected],123.45.67.89): unknown user
Jul 6 00:37:24 orion dovecot[7304]: auth(default): passwd-file([email protected],123.45.67.89): no passwd file: username_format=me /etc/virtual/mydomain.com/passwd
Jul 6 00:37:25 orion dovecot[7304]: auth(default): client out: FAIL 2 [email protected]
Jul 6 00:37:28 orion dovecot[7304]: imap-login: Disconnected: user=<[email protected]>, method=PLAIN, rip=123.45.67.89, lip=1.2.3.4
 
Without proper domain and mailbox information no one can really even begin to guess what the problem may be, but in your situation, even with it, my guess is that troubleshooting this will require someone log into your sever and look for the problem.

If your DirectAdmin license comes with support you should check with the DirectAdmin support department, here.

Jeff
 
I actually find something interesting, I have reverted back to imapd and pop3d after have similar above issues.

But when I studied the dovecot.conf that I have for last week compare this week, there is a slight changes

the new one looks like this
userdb passwd-file {
args = username_format=%n /etc/virtual/%d/passwd
}

the old one (from last week) looks like this
userdb passwd-file {
args = /etc/virtual/%d/passwd
}

Do you think there will be any differences?
Note, this is 1.0.14 from customapache
 
Last edited:
OK,

I have tried using the old dovecot.conf from last week, and it works perfectly!
Here is for those who is looking for it

Code:
## Dovecot 1.0 configuration file

protocols = imap imaps pop3 pop3s

#ssl_cert_file = /etc/exim.cert
#ssl_key_file =  /etc/exim.key
ssl_cert_file = /etc/httpd/conf/ssl.crt/server.crt
ssl_key_file = /etc/httpd/conf/ssl.key/server.key


disable_plaintext_auth = no

##
## Login processes
##

#login_chroot = yes

login_user = dovecot
login_processes_count = 16

login_greeting = Dovecot DA ready.

##
## Mail processes
##

verbose_proctitle = yes

first_valid_uid = 500
last_valid_uid = 0


mail_access_groups = mail

#mail_debug = no

default_mail_env = maildir:~/Maildir

# Like mailbox_check_interval, but used for IDLE command.
#mailbox_idle_check_interval = 30

# Copy mail to another folders using hard links. This is much faster than
# actually copying the file. This is problematic only if something modifies
# the mail in one folder but doesn't want it modified in the others. I don't
# know any MUA which would modify mail files directly. IMAP protocol also
# requires that the mails don't change, so it would be problematic in any case.
# If you care about performance, enable it.
#maildir_copy_with_hardlinks = no

# umask to use for mail files and directories
umask = 0007

# Set max. process size in megabytes. Most of the memory goes to mmap()ing
# files, so it shouldn't harm much even if this limit is set pretty high.
#mail_process_size = 256

# Log prefix for mail processes. See doc/variables.txt for list of possible
# variables you can use.
#mail_log_prefix = "%Us(%u): "

##
## IMAP specific settings
##

protocol imap {

  # Maximum IMAP command line length in bytes. Some clients generate very long
  # command lines with huge mailboxes, so you may need to raise this if you get
  # "Too long argument" or "IMAP command line too large" errors often.
  #imap_max_line_length = 65536

  # Send IMAP capabilities in greeting message. This makes it unnecessary for
  # clients to request it with CAPABILITY command, so it saves one round-trip.
  # Many clients however don't understand it and ask the CAPABILITY anyway.
  #login_greeting_capability = no

  # Workarounds for various client bugs:
  #   delay-newmail:
  #     Send EXISTS/RECENT new mail notifications only when replying to NOOP
  #     and CHECK commands. Some clients ignore them otherwise, for example
  #     OSX Mail. Outlook Express breaks more badly though, without this it
  #     may show user "Message no longer in server" errors. Note that OE6 still
  #     breaks even with this workaround if synchronization is set to
  #     "Headers Only".
  #   outlook-idle:
  #     Outlook and Outlook Express never abort IDLE command, so if no mail
  #     arrives in half a hour, Dovecot closes the connection. This is still
  #     fine, except Outlook doesn't connect back so you don't see if new mail
  #     arrives.
  #   netscape-eoh:
  #     Netscape 4.x breaks if message headers don't end with the empty "end of
  #     headers" line. Normally all messages have this, but setting this
  #     workaround makes sure that Netscape never breaks by adding the line if
  #     it doesn't exist. This is done only for FETCH BODY[HEADER.FIELDS..]
  #     commands. Note that RFC says this shouldn't be done.
  #   tb-extra-mailbox-sep:
  #     With mbox storage a mailbox can contain either mails or submailboxes,
  #     but not both. Thunderbird separates these two by forcing server to
  #     accept '/' suffix in mailbox names in subscriptions list.
  #imap_client_workarounds = outlook-idle
}
  
##
## POP3 specific settings
##

protocol pop3 {

  # Don't try to set mails non-recent or seen with POP3 sessions. This is
  # mostly intended to reduce disk I/O. With maildir it doesn't move files
  # from new/ to cur/, with mbox it doesn't write Status-header.
  #pop3_no_flag_updates = no

  # Support LAST command which exists in old POP3 specs, but has been removed
  # from new ones. Some clients still wish to use this though. Enabling this
  # makes RSET command clear all \Seen flags from messages.
  #pop3_enable_last = no
  
  # POP3 UIDL format to use. You can use following variables:
  #
  #  %v - Mailbox UIDVALIDITY
  #  %u - Mail UID
  #  %m - MD5 sum of the mailbox headers in hex (mbox only)
  #  %f - filename (maildir only)
  #
  # If you want UIDL compatibility with other POP3 servers, use:
  #  UW's ipop3d         : %08Xv%08Xu
  #  Courier version 0   : %f
  #  Courier version 1   : %u
  #  Courier version 2   : %v-%u
  #  Cyrus (<= 2.1.3)    : %u
  #  Cyrus (>= 2.1.4)    : %v.%u
  #
  # Note that Outlook 2003 seems to have problems with %v.%u format which is
  # Dovecot's default, so if you're building a new server it would be a good
  # idea to change this. %08Xu%08Xv should be pretty fail-safe.

  #pop3_uidl_format = %v.%u
  pop3_uidl_format = %08Xu%08Xv

  # POP3 logout format string:
  #  %t - number of TOP commands
  #  %T - number of bytes sent to client as a result of TOP command
  #  %r - number of RETR commands
  #  %R - number of bytes sent to client as a result of RETR command
  #  %d - number of deleted messages
  #  %m - number of messages (before deletion)
  #  %s - mailbox size in bytes (before deletion)
  #pop3_logout_format = top=%t/%T, retr=%r/%R, del=%d/%m, size=%s

  # Support for dynamically loadable modules.
  #mail_use_modules = no
  #mail_modules = /usr/lib/dovecot/pop3

  # Workarounds for various client bugs:
  #   outlook-no-nuls:
  #     Outlook and Outlook Express hang if mails contain NUL characters.
  #     This setting replaces them with 0x80 character.
  #   oe-ns-eoh:
  #     Outlook Express and Netscape Mail breaks if end of headers-line is
  #     missing. This option simply sends it if it's missing.
  #pop3_client_workarounds = 
}

##
## Authentication processes
##

# Set max. process size in megabytes.
#auth_process_size = 256

# Authentication cache size in kilobytes.
auth_cache_size = 0
# Time to live in seconds for cached data. After this many seconds a cached
# record is forced out of cache.
#auth_cache_ttl = 3600

# List of allowed characters in username. If the user-given username contains
# a character not listed in here, the login automatically fails. This is just
# an extra check to make sure user can't exploit any potential quote escaping
# vulnerabilities with SQL/LDAP databases. If you want to allow all characters,
# set this value to empty.
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&

# More verbose logging. Useful for figuring out why authentication isn't
# working.
auth_verbose = yes

# Even more verbose logging for debugging purposes. Shows for example SQL
# queries.
#auth_debug = no

# Maximum number of dovecot-auth worker processes. They're used to execute
# blocking passdb and userdb queries (eg. MySQL and PAM). They're
# automatically created and destroyed as needed.
#auth_worker_max_count = 30

auth default {
  mechanisms = plain

  #FreeBSD may require this instead of 'passdb shadow'
  #passdb passwd {
  #}

  passdb shadow {
  }

  passdb passwd-file {
    args = /etc/virtual/%d/passwd
  }

  userdb passwd {
  }

  userdb passwd-file {
    args = /etc/virtual/%d/passwd
  }


  # User to use for the process. This user needs access to only user and
  # password databases, nothing else. Only shadow and pam authentication
  # requires roots, so use something else if possible. Note that passwd
  # authentication with BSDs internally accesses shadow files, which also
  # requires roots. Note that this user is NOT used to access mails.
  # That user is specified by userdb above.
  user = root

  # Number of authentication processes to create
  #count = 1
}
 
wchost, you had a new dovecot.conf file which is used for Dovecot 1.1+, it is not compatible with Dovecot 1.0.
 
the same issue

smtalk,

I have the same issue :( It happend after upgrading dovecot from custombild.

./build dovecot


what to do now?:(

wchost solution is working! After changing this file to old it is working ok.
 
Last edited:
wchost, you had a new dovecot.conf file which is used for Dovecot 1.1+, it is not compatible with Dovecot 1.0.

I also had this problem after installing binaries via custombuild 1.1 on a new server. I reverted the dovecot.conf file to one from another server to get it to work.

Possible bug in custombuild script? (dovecot version 1.1.8)

Jon
 
Back
Top