[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#649265: provide coordinated mechanism to manage /etc/nsswitch.conf among packages



Package: libc-bin
Version: 2.13-38
Followup-For: Bug #649265

Dear Maintainer,

I spoke with Steve Langasek on irc a few moments ago after reviewing
this bug.  He informs me that there is still not a coordinated way to
manage /etc/nsswitch.conf.

I am working on a project to migrate a number of NIS machines to use
Active Directory user and group management, authentication and
authorization.  The following is an excerpt from a script we are using
to update the CentOS 5 hosts, and I will likely use most of it for
Debian and Ubuntu since there is not really a better option:

# Configure system
echo "- Running authconfig"
authconfig --enablekrb5 --enablewinbind --enablewinbindauth --update
echo "- Processing ${NSS}"
cp ${NSS} ${BACKUP_DIR}/${NSS_FILE}.${TIMESTAMP}
TEMP_FILE="/tmp/${NSS_FILE}.${TIMESTAMP}"
cp -f ${NSS} ${TEMP_FILE}
echo "-- Switching order of passwd line"
cat ${TEMP_FILE} | sed "s/^passwd:.*/passwd:     files winbind nis/" > ${TEMP_FILE}.1
mv -f ${TEMP_FILE}.1 ${TEMP_FILE}
echo "-- Switching order of shadow line"
cat ${TEMP_FILE} | sed "s/^shadow:.*/shadow:     files winbind nis/" > ${TEMP_FILE}.1
mv -f ${TEMP_FILE}.1 ${TEMP_FILE}
echo "-- Switching order of group line"
cat ${TEMP_FILE} | sed "s/^group:.*/group:      files winbind nis/" > ${TEMP_FILE}.1
mv -f ${TEMP_FILE}.1 ${TEMP_FILE}
mv -f ${TEMP_FILE} ${NSS}

V/R,

C.J.

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.21 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information


Reply to: