User authentication using local file

Horst Simon
Thu, 23 Mar 2023 04:09:26 -0000

I am not sure if I understand it correctly, that this configuration is for each
user has its mailbox in its home directory. This is not my intention, I have in
10-mail.conf the mailloration configured as:
mail_location = maildir:/opt/local/var/spool/dovecot/%u:LAYOUT=fs


> On 23 Mar 2023, at 12:37, Duc Anh Do <doducanh2710 at gmail.com>
wrote:
>
> Hi,
>
> The args parameter of userdb contains scheme, username format and location
of the password file. Please take a look this link
https://doc.dovecot.org/configuration_manual/authentication/passwd_file/
>
> For example, mine is:
> userdb {
>   driver = passwd-file
>   args = username_format=%u /etc/dovecot/imap.passwd
> }
>
> $ head /etc/dovecot/imap.passwd
> to at
localhost.local:{plain}1:vmail:vmail::::userdb_mail=mdbox:~/Mdbox/%d/%n:INDEX=~/indexes/%d/%n
>
> On Thu, 23 Mar 2023 at 05:08, Horst Simon <horst.simon2 at icloud.com
<mailto:horst.simon2 at icloud.com>> wrote:
>> OS environment:
>>
>> Linux qnap-nas 5.10.60-qnap #1 SMP Thu Jan 12 04:39:10 CST 2023 x86_64
GNU/Linux
>>
>> I enabled  "auth-passwdfile.conf.ext? in 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-static.conf.ext
>>
>> In this file I have following entries and I don?t know what to enter
for userdb
>>
>> passdb {
>>   driver = passwd-file
>>   args = /opt/local/etc/dovecot/users
>> }
>>
>> userdb {
>>   driver = passwd-file
>>   #args = username_format=%u /opt/local/etc/dovecot/users
>>
>>   # Default fields that can be overridden by passwd-file
>>   #default_fields = quota_rule=*:storage=1G
>>
>>   # Override fields from passwd-file
>>   #override_fields = home=/home/virtual/%u
>> }
>>
>> In the users file I have 2 users defined as follow:
>> user1:{SSHA512}<encrypted password>::::::
>> user2:{SSHA512}<encrypted password::::::
>>
>> Dovecot gives following error message on startup:
>> Mar 23 08:50:30 master: Info: Dovecot v2.3.20 (80a5ac675d) starting up
for imap, lmtp, sieve (core dumps disabled)
>> Mar 23 08:50:30 auth: Debug: Loading modules from directory:
/opt/local/lib/dovecot/auth
>> Mar 23 08:50:30 auth: Debug: Module loaded:
/opt/local/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
>> Mar 23 08:50:30 auth: Fatal: userdb passwd-file: Missing args
>>
>> I don?t know what arguments I have to enter for userdb
>>
>> Horst
>>
>> > On 22 Mar 2023, at 23:00, Narcis Garcia
>> >
>> > Please, specify OS environment, Dovecot version, and what options
did
>> > you try.
>> >
>> >
>> > El 22/3/23 a les 4:52, Horst Simon ha escrit:
>> >> I try to configure to have user authenticate to a local file
called
>> >> users, with their mailboxes in ../../spool/dovecot, not in
their home
>> >> directories. I have this working correctly with pam
authentication on
>> >> different servers(openSuse and macOS). This server has no pam
>> >> authentication so I need to use a local file, but I can not
make any
>> >> sense of the documentation, can someone please help on which
files I
>> >> need to change and to which values.
>> >> I tried several options but getting all kind of errors with
UID.
>> >>
>> >> Horst
>> >>
>> >
>> > --
>> >
>> > Narcis Garcia
>> >
>> > __________
>> > I'm using this dedicated address because personal addresses
aren't
>> > masked enough at this mail public archive. Public archive
administrator
>> > should fix this against automated addresses collectors.
>> >
>> >
>> > ------------------------------
>> >
>> > Subject: Digest Footer
>> >
>> > _______________________________________________
>> > dovecot mailing list
>> > dovecot at dovecot.org <mailto:dovecot at dovecot.org>
>> > https://dovecot.org/mailman/listinfo/dovecot
>> >
>> >
>> > ------------------------------
>> >
>> > End of dovecot Digest, Vol 239, Issue 36
>> > ****************************************
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://dovecot.org/pipermail/dovecot/attachments/20230323/56ca41a5/attachment-0001.htm>