CONTENT
- CHANGES
Szukaj
#top Multiple Authentication Databases¶
Dokumentacja Dovecot: Authentication / MultipleDatabases (Dovecot 1.*) | Authentication / MultipleDatabases (Dovecot 2.*)
Dovecot 1.*:
/etc/dovecot.conf
Dovecot 2.*:
/etc/dovecot/conf.d/10-auth.conf
EXAMPLES
(Dovecot 1.*) Zmiany jakie należy wprowadzić w
/etc/dovecot.conf
:# Mail location for both system and virtual users: mail_location = maildir:~/Maildir auth default { mechanisms = plain # try to authenticate using SQL database first passdb sql { args = /etc/dovecot-sql.conf } # fallback to PAM passdb pam { } # look up users from SQL first (even if authentication was done using PAM!) userdb sql { args = /etc/dovecot-sql.conf } # if not found, fallback to /etc/passwd userdb passwd { } }
(Dovecot 2.*) Zmiany jakie należy wprowadzić w
/etc/dovecot/conf.d/10-auth.conf
:#!include auth-deny.conf.ext #!include auth-master.conf.ext #!include auth-system.conf.ext #!include auth-sql.conf.ext #!include auth-ldap.conf.ext #!include auth-passwdfile.conf.ext #!include auth-checkpassword.conf.ext #!include auth-vpopmail.conf.ext #!include auth-static.conf.ext !include auth-sql.conf.ext !include auth-system.conf.ext
NOTICE: domyślne ustawienia w poniższych plikach nie wymagają zmiany (przedstawione dla porównania konfiguracji)
Zawartość pliku
/etc/dovecot/conf.d/auth-sql.conf.ext
:# Authentication for SQL users. Included from auth.conf. # # <doc/wiki/AuthDatabase.SQL.txt> passdb { driver = sql # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext args = /etc/dovecot/dovecot-sql.conf.ext } # "prefetch" user database means that the passdb already provided the # needed information and there's no need to do a separate userdb lookup. # <doc/wiki/UserDatabase.Prefetch.txt> #userdb { # driver = prefetch #} userdb { driver = sql args = /etc/dovecot/dovecot-sql.conf.ext } # If you don't have any user-specific settings, you can avoid the user_query # by using userdb static instead of userdb sql, for example: # <doc/wiki/UserDatabase.Static.txt> #userdb { #driver = static #args = uid=vmail gid=vmail home=/var/vmail/%u #}
Zawartość pliku
/etc/dovecot/conf.d/auth-system.conf.ext
:# Authentication for system users. Included from auth.conf. # # <doc/wiki/PasswordDatabase.txt> # <doc/wiki/UserDatabase.txt> # PAM authentication. Preferred nowadays by most systems. # PAM is typically used with either userdb passwd or userdb static. # REMEMBER: You'll need /etc/pam.d/dovecot file created for PAM # authentication to actually work. <doc/wiki/PasswordDatabase.PAM.txt> passdb { driver = pam # [session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=<n>] # [cache_key=<key>] [<service name>] #args = dovecot } # System users (NSS, /etc/passwd, or similiar). # In many systems nowadays this uses Name Service Switch, which is # configured in /etc/nsswitch.conf. <doc/wiki/AuthDatabase.Passwd.txt> #passdb { #driver = passwd # [blocking=no] #args = #} # Shadow passwords for system users (NSS, /etc/shadow or similiar). # Deprecated by PAM nowadays. # <doc/wiki/PasswordDatabase.Shadow.txt> #passdb { #driver = shadow # [blocking=no] #args = #} # PAM-like authentication for OpenBSD. # <doc/wiki/PasswordDatabase.BSDAuth.txt> #passdb { #driver = bsdauth # [blocking=no] [cache_key=<key>] #args = #} ## ## User databases ## # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this # uses Name Service Switch, which is configured in /etc/nsswitch.conf. userdb { # <doc/wiki/AuthDatabase.Passwd.txt> driver = passwd # [blocking=no] #args = } # Static settings generated from template <doc/wiki/UserDatabase.Static.txt> #userdb { #driver = static # Can return anything a userdb could normally return. For example: # # args = uid=500 gid=500 home=/var/mail/%u # # LDA and LMTP needs to look up users only from the userdb. This of course # doesn't work with static userdb because there is no list of users. # Normally static userdb handles this by doing a passdb lookup. This works # with most passdbs, with PAM being the most notable exception. If you do # the user verification another way, you can add allow_all_users=yes to # the args in which case the passdb lookup is skipped. # #args = #}
Zmodyfikowany ostatnio: 2018/01/01 16:08:01 (7 lat temu),
textsize: 43,5 kB,
htmlsize: 7,95 kB
Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników