Subject: postfix: chroot environment does not work with libnss-mysql-bg
Date: Wed, 27 Oct 2004 11:09:42 -0400
Package: postfix
Version: 2.1.4-5
Severity: normal
libnss-mysql-bg allows for UNIX users to be stored in a MySQL database.
All system commands work with these users as expected: `getent passwd`,
etc.
Debian's postfix configuration runs in a chroot environment, by default.
According to bug #274323, this is undocumented. It certainly
caught me by surprise, as my libnss-mysql-bg users could not receive mail
from postfix, though postfix-mysql could properly access virtual users
and deliver to them.
/etc/init.d/postfix prepares the chroot environment in part by copying
/etc/passwd to the chroot. This was what caused all my libnss-mysql-bg
users to be exlcuded:
sed 's/^\([^:]*\):[^:]*/\1:x/' /etc/passwd > etc/passwd
Would the following line work, to include /etc/passwd users _and_
libnss-mysql-users?
getent passwd | sed 's/^\([^:]*\):[^:]*/\1:x/' > etc/passwd
Presumably this would put all system users, regardless of backend, into
the chroot etc/passwd. I'm not sure if there are security
considerations with this approach, though.
My post to postfix-users:
http://marc.theaimsgroup.com/?l=postfix-users&m=109888197220940&w=2
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686-smp
Locale: LANG=en_US, LC_CTYPE=en_US
Versions of packages postfix depends on:
ii adduser 3.59 Add and remove users and groups
ii debconf [debconf-2.0] 1.4.30.8 Debian configuration management sy
ii dpkg 1.10.23 Package maintenance system for Deb
ii libc6 2.3.2.ds1-18 GNU C Library: Shared libraries an
ii libdb4.2 4.2.52-17 Berkeley v4.2 Database Libraries [
ii libgdbm3 1.8.3-2 GNU dbm database routines (runtime
ii netbase 4.18 Basic TCP/IP networking system
-- debconf information:
postfix/master_upgrade_warning:
postfix/db_upgrade_warning: true
* postfix/mailname: mail.skippy.net
postfix/dynamicmaps_upgrade_warning:
postfix/recipient_delim: +
* postfix/main_mailer_type: Internet Site
postfix/transport_map_warning:
* postfix/append_dot_mydomain: false
postfix/relayhost:
postfix/procmail: true
postfix/bad_recipient_delimiter:
* postfix/chattr: false
* postfix/root_address: skippy
postfix/rfc1035_violation: false
postfix/mynetworks: 127.0.0.0/8
* postfix/destinations: skippy.net, mail.skippy.net, localhost.localdomain, localhost
postfix/nqmgr_upgrade_warning:
postfix/not_configured:
postfix/mailbox_limit: 0
Changed Bug title to '[chroot] postfix: chroot environment does not work with libnss-mysql-bg' from 'postfix: chroot environment does not work with libnss-mysql-bg'.
Request was from Michael Tokarev <[email protected]>
to [email protected].
(Wed, 04 Dec 2024 17:42:02 GMT) (full text, mbox, link).
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.