Missing FreeBSD map file

Today I learned FreeBSD can’t lodge email reports for root if aliases.db was never created, either in bsdinstall or your jail.

Long story short, I was seeing this after sudo-ing into a new instance:

[date] [hostname] sudo: [user]: user NOT in sudoers ; [..]

Heh, my bad. But then this appeared:

SYSERR(root): hash map "Alias0": missing map file /etc/mail/aliases.db
No such file or directory

Huh. So just to try, I “created” the file thusly:

# touch /etc/mail/aliases.db

Needless to say, that didn’t work! The solution, ironically from some ancient Red Hat docs:

# makemap hash /etc/mail/aliases.db < /etc/mail/aliases

This command must be run after creating an /etc/mail/aliases file. You also need to run it if you make any changes.

Happy long weekend!


Imprint

This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at weblog2017@rubenschade.com. Thanks :).