On Wed, 20 May 1998, Mihai Ibanescu wrote:

>       I am trying to buid support for another type of password databases
>(/etc/passwd and /etc/shadow are _slow_ for >2k users). I am trying to put

1. Install glibc.

2. Add to /etc/nsswitch.conf in the password section the db option.

3. Write a plain password sytle file wherever you want and run:

passwd2db </whereveryouwant/secondpasswd | makedb -o /var/db/passwd.db -

passwd2db is a script I extracted by the glibc sources:

#!/usr/bin/awk -f
# Filter to translate passwd files to glibc db files.
BEGIN { FS=":"; OFS=":"; cnt=0 }
        /^[ \t]*$/ { next }
        /^[ \t]*#/ { next }
        { printf "0%u ", cnt++; print }
        /^[^#]/ { printf ".%s ", $1; print;
        printf "=%s ", $3; print }

Andrea[s] Arcangeli

Reply via email to