Опубликован: 06.08.2012 | Доступ: свободный | Студентов: 1335 / 49 | Оценка: 5.00 / 5.00 | Длительность: 53:41:00
Лекция 30:

FreeBSD configuration File

/etc/group

/etc/group defines the groups known to the system. You normally update it when adding users, for example with vipw or adduser, though you can also edit it directly. See page 113 for more details.

/etc/namedb/named.conf

/etc/named/named.conf is the main configuration file for named, the Domain Name Service daemon. We looked at it in "Chapter 21" . Previous versions of named used a different form of configuration file stored in /etc/named.boot.

/etc/mail

The directory /etc/mail contains configuration information for some MTAs, including sendmail.

/etc/master.passwd

/etc/master.passwd is the real password file. Like /etc/group, you update with vipw or adduser. See page 144 for more details.

Files you might need to change

You don't need to customize any of the following files to get the system up and running. You may find it necessary to change them to do specific things, however.

/etc/crontab

/etc/crontab describes the jobs to be performed by cron on behalf of the system. You don't have to use this file at all; you can use each user's crontab files instead. Note that this file has a slightly different format from the other crontab fies. A user's crontab contains entries like this:

0  0  *  *  *  /home/grog/Scripts/rotate-log

This line runs the script /home/grog/Scripts/rotate-log at midnight every day. If you put this entry into /etc/crontab, you need to tell cron which user to run it as. Do this by putting the name of the user before the command:

0  0  *  *  *  grog  /home/grog/Scripts/rotate-log

See page 151 for more details about cron.

/etc/csh.cshrc, /etc/csh.login, /etc/csh.logout

These are default initialization files for csh. See the man page csh(1) for more details.

/etc/dhclient.conf

/etc/dhclient.conf describes the client side of DHCP services. Normally it's empty. We discussed dhcp on 302.

/etc/disktab

/etc/disktab contains descriptions of disk geometries for disklabel. This is almost obsolete.

/etc/ftpusers

/etc/ftpusers is a list of users who are not allowed to connect to this system using ftp. It's a strong contender for the prize for the worst-named file in the system.

/etc/hosts

For a small network, especially if you're not permanently connected to the Internet, you have the option of placing the addresses of the systems you want to talk to in a file called /etc/hosts. This file is simply a list of IP addresses and host names, for example:

#Local network host addresses #
#
#loopback address for all systems
127.1 loopback local localhost
###### domain example.com.
#
223.147.37.1  freebie freebie.example.org  # FreeBSD 3.0
223.147.37.2  presto.example.org presto    # 66 MHz 486 (BSD UNIX)

Before the days of DNS, this was the way to resolve lP addresses. It only works locally, and even there it's a pain to maintain: you need to propagate every update to every machine on the network. As we saw in "Chapter 21" , it's far preferable to run named, even if you're not connected to the Internet.

/etc/hosts.equiv

/etc/hosts.equiv is a list of hosts whose users may use rsh to access this system without supplying a password. rsh is now obsolete, so it's unlikely you'll need to change this file. See the description of ssh on page 419 for a replacement.

/etc/hosts.lpd

/etc/hosts.lpd is a list of hosts that can use the lpd spooler on this system.

/etc/inetd.conf

/etc/inetd.conf is the configuration file for inetd, the Internet daemon. It dates back to the original implementation of TCP/IP in 4.2BSD, and the format is the same for all versions of UNIX. We have looked at various modifications to this file throughout the network part of the book. See the index (inetd.conf) and the man page inetd.conf(5) for further details. FreeBSD now disables all services by default to limit security exposures, so there's a good chance you'll have to edit this file.

/etc/login.acces

/etc/login.access is a file that limits remote access by individual users. We don't look at it in more detail here.