Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

status of nsswitch.conf in current?

7 views
Skip to first unread message

Richard Coleman

unread,
Aug 22, 2003, 12:34:24 AM8/22/03
to freebsd...@freebsd.org
What is the status of nsswitch.conf in current?

I noticed that there is a man page for "nsswitch.conf". But there is no
such file installed in /etc, nor is there an example copy in
/usr/share/examples/etc.

I just cvsup'ed tonight (Thursday) and built world. So, I'm up to date.

Richard Coleman
richard...@mindspring.com


_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

Ruslan Ermilov

unread,
Aug 22, 2003, 1:45:50 AM8/22/03
to Richard Coleman, freebsd...@freebsd.org
On Fri, Aug 22, 2003 at 12:33:45AM -0400, Richard Coleman wrote:
> What is the status of nsswitch.conf in current?
>
> I noticed that there is a man page for "nsswitch.conf". But there is no
> such file installed in /etc, nor is there an example copy in
> /usr/share/examples/etc.
>
> I just cvsup'ed tonight (Thursday) and built world. So, I'm up to date.
>
Please see the ``Default source lists'' section of the nsswitch.conf(5)
manpage that talks about this case.


Cheers,
--
Ruslan Ermilov Sysadmin and DBA,
r...@sunbay.com Sunbay Software Ltd,
r...@FreeBSD.org FreeBSD committer

Richard Coleman

unread,
Aug 22, 2003, 10:41:23 AM8/22/03
to Ruslan Ermilov, freebsd...@freebsd.org
I saw that. I guess my question is whether a default nsswitch.conf file
will be checked into /etc and /usr/share/examples/etc, or whether it
will be left empty? I would expect that if this capability was working,
that a default nsswitch.conf would be checked into /etc. Many admins
may not know the system has this capability unless they see a copy of
nsswitch.conf in /etc.

My next question is related to nss_ldap. Are there plans to add some
type of credentials caching daemon to speed up use of LDAP (or other
database) when using nsswitch.conf? If the hooks are there, I would be
willing to work on this myself.

Richard Coleman
richard...@mindspring.com

Ruslan Ermilov wrote:
> On Fri, Aug 22, 2003 at 12:33:45AM -0400, Richard Coleman wrote:
>
>>What is the status of nsswitch.conf in current?
>>
>>I noticed that there is a man page for "nsswitch.conf". But there is no
>>such file installed in /etc, nor is there an example copy in
>>/usr/share/examples/etc.
>>
>>I just cvsup'ed tonight (Thursday) and built world. So, I'm up to date.
>>
>
> Please see the ``Default source lists'' section of the nsswitch.conf(5)
> manpage that talks about this case.

Ruslan Ermilov

unread,
Aug 22, 2003, 11:53:58 AM8/22/03
to Richard Coleman, Jacques A. Vidrine, freebsd...@freebsd.org
On Fri, Aug 22, 2003 at 10:40:32AM -0400, Richard Coleman wrote:
> I saw that. I guess my question is whether a default nsswitch.conf file
> will be checked into /etc and /usr/share/examples/etc, or whether it
> will be left empty? I would expect that if this capability was working,
> that a default nsswitch.conf would be checked into /etc.
>
Adding /etc/nsswitch.conf with the default settings would just slow the
things down. For the same reason, we don't provide /etc/resolv.conf by
default. Adding src/share/examples/etc/nsswitch.conf and installing it
in /usr/share/examples/etc/ is a good idea.

> Many admins
> may not know the system has this capability unless they see a copy of
> nsswitch.conf in /etc.
>

Many admins should learn how to consult with the release notes then. ;-)

Tim Kientzle

unread,
Aug 22, 2003, 2:16:40 PM8/22/03
to Ruslan Ermilov, Jacques A. Vidrine, Richard Coleman, freebsd...@freebsd.org
Ruslan Ermilov wrote:
> On Fri, Aug 22, 2003 at 10:40:32AM -0400, Richard Coleman wrote:
>
>>I saw that. I guess my question is whether a default nsswitch.conf file
>>will be checked into /etc and /usr/share/examples/etc, or whether it
>>will be left empty? I would expect that if this capability was working,
>>that a default nsswitch.conf would be checked into /etc.
>>
>
> Adding /etc/nsswitch.conf with the default settings would just slow the
> things down. For the same reason, we don't provide /etc/resolv.conf by
> default. Adding src/share/examples/etc/nsswitch.conf and installing it
> in /usr/share/examples/etc/ is a good idea.

On the other hand, having

/etc/nsswitch.conf.example

would
a) Advertise the existence of nsswitch capabilities in
an obvious place where people new to FreeBSD would
see it.
b) Document the defaults.
c) Not slow anything down.
d) Serve as an example and template for people just
getting started..

Having additional examples in /usr/share/examples/etc
would also be nice. (Ideally, with a comment in
/etc/nsswitch.conf.example pointing to those additional
examples.)

I do find Ruslan's logic here a bit peculiar, though. Having
an nsswitch.conf with the default settings should only
"slow things down" by the time needed to parse the file.
Well-written parsers are very fast.

One could equally well argue that people for whom this level
of performance really matters should read the release notes. ;-)

Tim

Jacques A. Vidrine

unread,
Aug 22, 2003, 2:21:46 PM8/22/03
to Tim Kientzle, Richard Coleman, freebsd...@freebsd.org
On Fri, Aug 22, 2003 at 11:15:01AM -0700, Tim Kientzle wrote:
> On the other hand, having
>
> /etc/nsswitch.conf.example
>
> would
> a) Advertise the existence of nsswitch capabilities in
> an obvious place where people new to FreeBSD would
> see it.
> b) Document the defaults.
> c) Not slow anything down.
> d) Serve as an example and template for people just
> getting started..

There is no `default nsswitch.conf' mostly because it would have to be
kept in sync with the *actual* defaults as implemented in libc.

The nsswitch.conf(5) man page fulfills (a)-(d). That _is_ what
documentation is for, after all.

Cheers,
--
Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal
nec...@celabo.org . jvid...@verio.net . nec...@freebsd.org . nec...@kth.se

Gordon Tetlow

unread,
Aug 22, 2003, 2:33:41 PM8/22/03
to Tim Kientzle, Jacques A. Vidrine, Richard Coleman, freebsd...@freebsd.org
On Fri, Aug 22, 2003 at 11:15:01AM -0700, Tim Kientzle wrote:
> Ruslan Ermilov wrote:
> >On Fri, Aug 22, 2003 at 10:40:32AM -0400, Richard Coleman wrote:
> >
> >>I saw that. I guess my question is whether a default nsswitch.conf file
> >>will be checked into /etc and /usr/share/examples/etc, or whether it
> >>will be left empty? I would expect that if this capability was working,
> >>that a default nsswitch.conf would be checked into /etc.
> >>
> >
> >Adding /etc/nsswitch.conf with the default settings would just slow the
> >things down. For the same reason, we don't provide /etc/resolv.conf by
> >default. Adding src/share/examples/etc/nsswitch.conf and installing it
> >in /usr/share/examples/etc/ is a good idea.
>
> On the other hand, having
>
> /etc/nsswitch.conf.example
>
> would
> a) Advertise the existence of nsswitch capabilities in
> an obvious place where people new to FreeBSD would
> see it.
> b) Document the defaults.
> c) Not slow anything down.
> d) Serve as an example and template for people just
> getting started..
e) clutter /etc with a file that serves no purpose other than
illustration.

It should either go in as /etc/nsswitch.conf or into
/usr/share/examples/etc.

-gordon

Richard Coleman

unread,
Aug 22, 2003, 5:31:02 PM8/22/03
to kien...@acm.org, Jacques A. Vidrine, freebsd...@freebsd.org
> Having additional examples in /usr/share/examples/etc
> would also be nice. (Ideally, with a comment in
> /etc/nsswitch.conf.example pointing to those additional
> examples.)

At the very least, a copy of the default nsswitch.conf should be in the
examples directory. Since I didn't find an example there, I figured
the facility was either not fully implemented yet, or broken (otherwise
an example would be there). That's the reason I asked on the list in
the first place. Since I'm pretty experienced with FreeBSD and it
confused me, you can be sure it will confuse others.

> I do find Ruslan's logic here a bit peculiar, though. Having
> an nsswitch.conf with the default settings should only
> "slow things down" by the time needed to parse the file.
> Well-written parsers are very fast.

I also feel that the logic that this will "slow things down" is a red
herring. For many of the common cases (i.e. host name resolution by a
remote DNS server) the amount of time to parse the nsswitch.conf will be
minuscule relative to the amount of time necessary for to perform the
lookup.

I would love to know how much overhead parsing the nsswitch.conf adds to
a local password lookup.

Richard Coleman
richard...@mindspring.com

0 new messages