This is an archive of past FreeBSD releases; it's part of the FreeBSD Documentation Archive.
The primary configuration file is /etc/defaults/rc.conf (see rc.conf(5)). System startup scripts such as /etc/rc and /etc/rc.d (see rc(8)) just include this file. Do not edit this file! Instead, if there is any entry in /etc/defaults/rc.conf that you want to change, you should copy the line into /etc/rc.conf and change it there.
For example, if you wish to start named(8), the included DNS server, all you need to do is:
# echo 'named_enable="YES"' >> /etc/rc.conf
To start up local services, place shell scripts in the /usr/local/etc/rc.d directory. These shell scripts should be set executable, the default file mode is 555.
This is normally caused by editing the system crontab (/etc/crontab) and then using crontab(1) to install it:
# crontab /etc/crontab
This is not the correct way to do things. The system crontab has a different format to the per-user crontabs which crontab(1) updates (the crontab(5) manual page explains the differences in more detail).
If this is what you did, the extra crontab is simply a copy of /etc/crontab in the wrong format it. Delete it with the command:
# crontab -r
Next time, when you edit /etc/crontab, you should not do anything to inform cron(8) of the changes, since it will notice them automatically.
If you want something to be run once per day, week, or month, it is probably better to add shell scripts /usr/local/etc/periodic, and let the periodic(8) command run from the system cron schedule it with the other periodic system tasks.
The actual reason for the error is that the system crontab has an extra field, specifying which user to run the command as. In the default system crontab provided with FreeBSD, this is root for all entries. When this crontab is used as the root user's crontab (which is not the same as the system crontab), cron(8) assumes the string root is the first word of the command to execute, but no such command exists.
This is a security feature. In order to su to root (or any other account with superuser privileges), you must be in the wheel group. If this feature were not there, anybody with an account on a system who also found out root's password would be able to gain superuser level access to the system. With this feature, this is not strictly true; su(1) will prevent them from even trying to enter the password if they are not in wheel.
To allow someone to su to root, simply put them in the wheel group.
Restart the system using boot -s at the loader prompt to enter Single User mode. When prompted for a shell pathname, simply press Enter, and run mount -urw / to re-mount the root file system in read/write mode. You may also need to run mount -a -t ufs to mount the file system where your favorite editor is defined. If your favorite editor is on a network file system, you will need to either configure the network manually before you can mount network file systems, or use an editor which resides on a local file system, such as ed(1).
Once you have performed these steps, you can edit /etc/rc.conf as you usually would to fix the syntax error. The error message displayed immediately after the kernel boot messages should tell you the number of the line in the file which is at fault.
See the Handbook entry on printing. It should cover most of your problem.
Some printers require a host-based driver to do any kind of printing. These so-called “WinPrinters” are not natively supported by FreeBSD. If your printer does not work in DOS or Windows®, it is probably a WinPrinter. Your only hope of getting one of these to work is to check if the print/pnm2ppa port supports it.
The following is an excerpt from a post to the FreeBSD-CURRENT mailing list.
The “can't assign resources” messages indicate that the devices are legacy ISA devices for which a non-PnP-aware driver is compiled into the kernel. These include devices such as keyboard controllers, the programmable interrupt controller chip, and several other bits of standard infrastructure. The resources cannot be assigned because there is already a driver using those addresses.
It is possible that your kernel is not configured to use quotas. If this is the case, you will need to add the following line to your kernel configuration file and recompile:
Please read the Handbook entry on quotas for full details.
Do not turn on quotas on /.
Put the quota file on the file system that the quotas are to be enforced on, i.e.:
Yes, FreeBSD supports System V-style IPC, including shared memory, messages and semaphores, in the GENERIC kernel. In a custom kernel, enable this support by adding the following lines to your kernel config.
options SYSVSHM # enable shared memory options SYSVSEM # enable for semaphores options SYSVMSG # enable for messaging
Recompile and install your kernel.
The sendmail server is the default mail-server software for FreeBSD, but you can easily replace it with one of the other MTA (for instance, an MTA installed from the ports).
Diversity is nice, and the fact that you have many different mail-servers to chose from is considered a good thing; therefore try to avoid asking questions like “Is sendmail better than qmail?” in the mailing lists. If you do feel like asking, first check the mailing list archives. The advantages and disadvantages of each and every one of the available MTAs have already been discussed a few times.
Do not panic! Restart the system, type boot -s at the Boot: prompt to enter Single User mode. At the question about the shell to use, hit Enter. You will be dropped to a # prompt. Enter mount -urw / to remount your root file system read/write, then run mount -a to remount all the file systems. Run passwd root to change the root password then run exit(1) to continue booting.
Note: If you are still prompted to give the root password when entering the Single User mode, it means that the console has been marked as insecure in /etc/ttys. In this case it will be required to boot from an FreeBSD installation disk, choose the Fixit shell from sysinstall(8) and issue the commands mentioned above.
Note: If you cannot mount your root partition from Single User mode, it is possible that the partitions are encrypted and it is impossible to mount them without the access keys. Your chances are depending on the chosen implementation. For more information see the section about encrypted disks in the FreeBSD Handbook.
If you are using syscons(4) (the default console driver) build and install a new kernel with the line in the configuration file:
This can also be done by setting the following sysctl(8) which does not require a reboot or kernel recompile:
# sysctl hw.syscons.kbd_reboot=0
Note: The above two methods are exclusive: The sysctl(8) does not exist if you compile your kernel with the SC_DISABLE_REBOOT option.
If you use the pcvt(4) console driver, use the following kernel configuration line instead and rebuild the kernel:
Use this perl(1) command:
% perl -i.bak -npe 's/\r\n/\n/g' file(s)
where file(s) is one or more files to process. The modification is done in-place, with the original file stored with a .bak extension.
Alternatively you can use the tr(1) command:
% tr -d '\r' < dos-text-file > unix-file
dos-text-file is the file containing DOS text while unix-file will contain the converted output. This can be quite a bit faster than using perl.
Yet another way to reformat DOS text files is to use the converters/dosunix port from the Ports Collection. Consult its documentation about the details.
The error comes from the Kerberos distributed
authentication system. The problem is not fatal but annoying. You can either run su with
-K option, or uninstall Kerberos as described in the next question.
To remove Kerberos from the system, reinstall the base distribution for the release you are running. If you have the CD-ROM, you can mount it (we will assume on /cdrom) and run the commands below:
# cd /cdrom/base # ./install.sh
Alternately, you can include the NO_KERBEROS option in your /etc/make.conf and rebuild world.
FreeBSD 5.X and beyond use the devfs(8) device-on-demand system. Device drivers automatically create new device nodes as they are needed, obsoleting /dev/MAKEDEV.
If you have a lot of telnet, ssh, X, or screen users, you might run out of pseudoterminals. By default, FreeBSD 6.2 and earlier support 256 pseudoterminals, while FreeBSD 6.3 and later support 512 pseudoterminals.
Tip: If needed, more pseudoterminals can be added. However, this requires patching the standard C library, the kernel, and /etc/ttys. For example, http://www.freebsd.org/~jhb/patches/pty_1152.patch expands the number of pseudoterminals to 1152. Note that the patch will only apply cleanly to FreeBSD 6.3 or later.
Go into single user mode and then back to multi user mode.
On the console do:
# shutdown now (Note: without -r or -h) # return # exit
Short answer: it is just a name. RC stands for “Release Candidate”. It signifies that a release is imminent. In FreeBSD, -PRERELEASE is typically synonymous with the code freeze before a release. (For some releases, the -BETA label was used in the same way as -PRERELEASE.)
Long answer: FreeBSD derives its releases from one of two places. Major, dot-zero, releases, such as 7.0-RELEASE and 8.0-RELEASE, are branched from the head of the development stream, commonly referred to as -CURRENT. Minor releases, such as 6.3-RELEASE or 5.2-RELEASE, have been snapshots of the active -STABLE branch. Starting with 4.3-RELEASE, each release also now has its own branch which can be tracked by people requiring an extremely conservative rate of development (typically only security advisories).
When a release is about to be made, the branch from which it will be derived from has to undergo a certain process. Part of this process is a code freeze. When a code freeze is initiated, the name of the branch is changed to reflect that it is about to become a release. For example, if the branch used to be called 6.2-STABLE, its name will be changed to 6.3-PRERELEASE to signify the code freeze and signify that extra pre-release testing should be happening. Bug fixes can still be committed to be part of the release. When the source code is in shape for the release the name will be changed to 6.3-RC to signify that a release is about to be made from it. Once in the RC stage, only the most critical bugs found can be fixed. Once the release (6.3-RELEASE in this example) and release branch have been made, the branch will be renamed to 6.3-STABLE.
For more information on version numbers and the various CVS branches, refer to the Release Engineering article.
Short answer: You are probably at security level greater than 0. Reboot directly to Single User mode to install the kernel.
Long answer: FreeBSD disallows changing system flags at security levels greater than 0. You can check your security level with the command:
# sysctl kern.securelevel
You cannot lower the security level; you have to boot to Single Mode to install the kernel, or change the security level in /etc/rc.conf then reboot. See the init(8) manual page for details on securelevel, and see /etc/defaults/rc.conf and the rc.conf(5) manual page for more information on rc.conf.
Short answer: You are probably at security level greater than 1. Reboot directly to Single User mode to change the date.
Long answer: FreeBSD disallows changing the time by more that one second at security levels greater than 1. You can check your security level with the command:
# sysctl kern.securelevel
You cannot lower the security level; you have to boot to Single User mode to change the date, or change the security level in /etc/rc.conf then reboot. See the init(8) manual page for details on securelevel, and see /etc/defaults/rc.conf and the rc.conf(5) manual page for more information on rc.conf.
No, there is no memory leak, and it is not using 256 MB of memory. For convenience, rpc.statd maps an obscene amount of memory into its address space. There is nothing terribly wrong with this from a technical standpoint; it just throws off things like top(1) and ps(1).
rpc.statd(8) maps its status file (resident on /var) into its address space; to save worrying about remapping it later when it needs to grow, it maps it with a generous size. This is very evident from the source code, where one can see that the length argument to mmap(2) is 0x10000000, or one sixteenth of the address space on an IA32, or exactly 256 MB.
The reason why .shosts authentication does not work by default in more recent versions of FreeBSD is because ssh(1) is not installed suid root by default. To “fix” this, you can do one of the following:
As a permanent fix, set ENABLE_SUID_SSH to true in /etc/make.conf then rebuild and install ssh(1) (or run make world).
As a temporary fix, change the mode on /usr/bin/ssh to 4555 by running chmod 4555 /usr/bin/ssh as root. Then add ENABLE_SUID_SSH= true to /etc/make.conf so the change takes effect the next time make world is run.
vnlru flushes and frees vnodes when the system hits
kern.maxvnodes limit. This kernel thread sits mostly
idle, and only activates if you have a huge amount of RAM and are accessing tens of
thousands of tiny files.
Active: pages recently statistically used.
Inactive: pages recently statistically unused.
Cache: (most often) pages that have percolated from inactive to a status where they maintain their data, but can often be immediately reused (either with their old association, or reused with a new association). There can be certain immediate transitions from active to cache state if the page is known to be clean (unmodified), but that transition is a matter of policy, depending upon the algorithm choice of the VM system maintainer.
Free: pages without data content, and can be immediately used in certain circumstances where cache pages might be ineligible. Free pages can be reused at interrupt or process state.
Wired: pages that are fixed into memory, usually for kernel purposes, but also sometimes for special use in processes.
Pages are most often written to disk (sort of a VM sync) when they are in the inactive state, but active pages can also be synced. This depends upon the CPU tracking of the modified bit being available, and in certain situations there can be an advantage for a block of VM pages to be synced, whether they are active or inactive. In most common cases, it is best to think of the inactive queue to be a queue of relatively unused pages that might or might not be in the process of being written to disk. Cached pages are already synced, not mapped, but available for immediate process use with their old association or with a new association. Free pages are available at interrupt level, but cached or free pages can be used at process state for reuse. Cache pages are not adequately locked to be available at interrupt level.
There are some other flags (e.g., busy flag or busy count) that might modify some of the described rules.
There are a couple of kinds of “free memory”. One kind is the amount of memory immediately available without paging anything else out. That is approximately the size of cache queue + size of free queue (with a derating factor, depending upon system tuning). Another kind of “free memory” is the total amount of VM space. That can be complex, but is dependent upon the amount of swap space and memory. Other kinds of “free memory” descriptions are also possible, but it is relatively useless to define these, but rather it is important to make sure that the paging rate is kept low, and to avoid running out of swap space.
/var/empty is a directory that the sshd(8) program uses when performing privilege separation. The /var/empty directory is empty, owned by root and has the schg flag set.
Although it is not recommended to delete this directory, to do so you will need to unset the schg flag first. See the chflags(1) manual page for more information (and bear in mind the answer to the question on unsetting the schg flag).