1 .\" $NetBSD: 3.t,v 1.3 1998/01/10 00:11:35 perry Exp $
3 .\" Copyright (c) 1980, 1986, 1988, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)3.t 8.2 (Berkeley) 6/1/94
34 .ds RH "Upgrading a \*(Ps System
36 .Sh 1 "Upgrading a \*(Ps system"
38 This section describes the procedure for upgrading a \*(Ps
39 system to \*(4B. This procedure may vary according to the version of
40 the system running before conversion.
41 If you are converting from a
42 System V system, some of this section will still apply (in particular,
43 the filesystem conversion). However, many of the system configuration
44 files are different, and the executable file formats are completely
47 In particular be wary when using this information to upgrade
49 There are at least four different versions of ``\*(Ps'' out there:
53 This was the original version of \*(Ps for HP300s from which the
54 other variants (and \*(4B) are derived.
55 It is largely a \*(Ps system with Sun's NFS 3.0 filesystem code and
56 some \*(Ps-Tahoe features (e.g. networking code).
57 Since the filesystem code is 4.2/4.3 vintage and the filesystem
58 hierarchy is largely \*(Ps, most of this section should apply.
60 MORE/bsd from Mt. Xinu.
62 This is a \*(Ps-Tahoe vintage system with Sun's NFS 4.0 filesystem code
63 upgraded with Tahoe UFS features.
64 The instructions for \*(Ps-Tahoe should largely apply.
68 At least one site bootstrapped HP300 support from the Reno distribution.
69 The Reno filesystem code was somewhere between \*(Ps and \*(4B: the VFS switch
70 had been added but many of the UFS features (e.g. ``inline'' symlinks)
72 The filesystem hierarchy reorganization first appeared in this release.
73 Be extremely careful following these instructions if you are
74 upgrading from the Reno distribution.
78 As if things were not bad enough already,
79 this release has the \*(4B filesystem and networking code
80 as well as some utilities, but still has a \*(Ps hierarchy.
81 No filesystem conversions are necessary for this upgrade,
82 but files will still need to be moved around.
83 .Sh 2 "Installation overview"
85 If you are running \*(Ps, upgrading your system
86 involves replacing your kernel and system utilities.
87 In general, there are three possible ways to install a new \*(Bs distribution:
88 (1) boot directly from the distribution tape, use it to load new binaries
89 onto empty disks, and then merge or restore any existing configuration files
91 (2) use an existing \*(Ps or later system to extract the root and
93 filesystems from the distribution tape,
94 boot from the new system, then merge or restore existing
95 configuration files and filesystems; or
96 (3) extract the sources from the distribution tape onto an existing system,
97 and use that system to cross-compile and install \*(4B.
98 For this release, the second alternative is strongly advised,
99 with the third alternative reserved as a last resort.
100 In general, older binaries will continue to run under \*(4B,
101 but there are many exceptions that are on the critical path
102 for getting the system running.
103 Ideally, the new system binaries (root and
105 filesystems) should be installed on spare disk partitions,
106 then site-specific files should be merged into them.
107 Once the new system is up and fully merged, the previous root and
109 filesystems can be reused.
110 Other existing filesystems can be retained and used,
111 except that (as usual) the new
113 should be run before they are mounted.
115 It is \fBSTRONGLY\fP advised that you make full dumps of each filesystem
116 before beginning, especially any that you intend to modify in place
118 It is also desirable to run filesystem checks
119 of all filesystems to be converted to \*(4B before shutting down.
120 This is an excellent time to review your disk configuration
121 for possible tuning of the layout.
122 Most systems will need to provide a new filesystem for system use
128 filesystem can be an MFS virtual-memory-resident filesystem,
129 potentially freeing an existing disk partition.
130 (Additional swap space may be desirable as a consequence.)
134 The recommended installation procedure includes the following steps.
135 The order of these steps will probably vary according to local needs.
139 filesystems from the distribution tapes.
141 Extract kernel and/or user-level sources from the distribution tape
143 This can serve as the backup documentation as needed.
145 Configure and boot a kernel for the local system.
146 This can be delayed if the generic kernel from the distribution
147 supports enough hardware to proceed.
154 Merge site-dependent configuration files from
161 Note that many file formats and contents have changed; see section 3.4
164 Copy or merge files from
169 and other locations into
172 Merge local macros, dictionaries, etc. into
175 Merge and update local software to reflect the system changes.
177 Take off the rest of the morning, you've earned it!
179 Section 3.2 lists the files to be saved as part of the conversion process.
180 Section 3.3 describes the bootstrap process.
181 Section 3.4 discusses the merger of the saved files back into the new system.
182 Section 3.5 gives an overview of the major
183 bug fixes and changes between \*(Ps and \*(4B.
184 Section 3.6 provides general hints on possible problems to be
185 aware of when converting from \*(Ps to \*(4B.
186 .Sh 2 "Files to save"
188 The following list enumerates the standard set of files you will want to
189 save and suggests directories in which site-specific files should be present.
190 This list will likely be augmented with non-standard files you
191 have added to your system.
192 If you do not have enough space to create parallel
193 filesystems, you should create a
195 image of the following files before the new filesystems are created.
196 The rest of this subsection describes where theses files
197 have moved and how they have changed.
200 /.cshrc \(dg root csh startup script (moves to \f(CW/root/.cshrc\fP)
201 /.login \(dg root csh login script (moves to \f(CW/root/.login\fP)
202 /.profile \(dg root sh startup script (moves to \f(CW/root/.profile\fP)
203 /.rhosts \(dg for trusted machines and users (moves to \f(CW/root/.rhosts\fP)
204 /etc/disktab \(dd in case you changed disk partition sizes
205 /etc/fstab * disk configuration data
206 /etc/ftpusers \(dg for local additions
207 /etc/gettytab \(dd getty database
208 /etc/group * group data base
209 /etc/hosts \(dg for local host information
210 /etc/hosts.equiv \(dg for local host equivalence information
211 /etc/hosts.lpd \(dg printer access file
212 /etc/inetd.conf * Internet services configuration data
213 /etc/named* \(dg named configuration files
214 /etc/netstart \(dg network initialization
215 /etc/networks \(dg for local network information
216 /etc/passwd * user data base
217 /etc/printcap * line printer database
218 /etc/protocols \(dd in case you added any local protocols
219 /etc/rc * for any local additions
220 /etc/rc.local * site specific system startup commands
221 /etc/remote \(dg auto-dialer configuration
222 /etc/services \(dd for local additions
223 /etc/shells \(dd list of valid shells
224 /etc/syslog.conf * system logger configuration
225 /etc/securettys * merged into ttys
226 /etc/ttys * terminal line configuration data
227 /etc/ttytype * merged into ttys
228 /etc/termcap \(dd for any local entries that may have been added
229 /lib \(dd for any locally developed language processors
230 /usr/dict/* \(dd for local additions to words and papers
231 /usr/include/* \(dd for local additions
232 /usr/lib/aliases * mail forwarding data base (moves to \f(CW/etc/aliases\fP)
233 /usr/lib/crontab * cron daemon data base (moves to \f(CW/etc/crontab\fP)
234 /usr/lib/crontab.local * local cron daemon data base (moves to \f(CW/etc/crontab.local\fP)
235 /usr/lib/lib*.a \(dg for local libraries
236 /usr/lib/mail.rc \(dg system-wide mail(1) initialization (moves to \f(CW/etc/mail.rc\fP)
237 /usr/lib/sendmail.cf * sendmail configuration (moves to \f(CW/etc/sendmail.cf\fP)
238 /usr/lib/tmac/* \(dd for locally developed troff/nroff macros (moves to \f(CW/usr/share/tmac/*\fP)
239 /usr/lib/uucp/* \(dg for local uucp configuration files
240 /usr/man/manl * for manual pages for locally developed programs (moves to \f(CW/usr/local/man\fP)
241 /usr/spool/* \(dg for current mail, news, uucp files, etc. (moves to \f(CW/var/spool\fP)
242 /usr/src/local \(dg for source for locally developed programs
243 /sys/conf/HOST \(dg configuration file for your machine (moves to \f(CW/sys/<arch>/conf\fP)
244 /sys/conf/files.HOST \(dg list of special files in your kernel (moves to \f(CW/sys/<arch>/conf\fP)
245 /*/quotas * filesystem quota files (moves to \f(CW/*/quotas.user\fP)
248 \(dg\|Files that can be used from \*(Ps without change.
249 \(dd\|Files that need local changes merged into \*(4B files.
250 *\|Files that require special work to merge and are discussed in section 3.4.
252 .Sh 2 "Installing \*(4B"
254 The next step is to build a working \*(4B system.
255 This can be done by following the steps in section 2 of
256 this document for extracting the root and
258 filesystems from the distribution tape onto unused disk partitions.
259 For the SPARC, the root filesystem dump on the tape could also be
261 For the HP300 and DECstation, the raw disk image can be copied
262 into an unused partition and this partition can then be dumped
263 to create an image that can be restored.
264 The exact procedure chosen will depend on the disk configuration
265 and the number of suitable disk partitions that may be used.
266 It is also desirable to run filesystem checks
267 of all filesystems to be converted to \*(4B before shutting down.
268 In any case, this is an excellent time to review your disk configuration
269 for possible tuning of the layout.
272 are required reading.
274 The filesystem in \*(4B has been reorganized in an effort to
277 The root filesystem should be small.
279 There should be a per-architecture centrally-shareable read-only
283 Variable per-machine directories should be concentrated below
284 a single mount point named
287 Site-wide machine independent shareable text files should be separated
288 from architecture specific binary files and should be concentrated below
289 a single mount point named
292 These goals are realized with the following general layouts.
293 The reorganized root filesystem has the following directories:
297 /bin (user binaries needed when single-user)
298 /sbin (root binaries needed when single-user)
299 /local (locally added binaries used only by this machine)
300 /tmp (mount point for memory based filesystem)
302 /home (mount point for AMD)
303 /var (mount point for per-machine variable directories)
304 /usr (mount point for multiuser binaries and files)
309 filesystem has the following directories:
312 /usr/bin (user binaries)
313 /usr/contrib (software contributed to \*(4B)
314 /usr/games (binaries for games, score files in \f(CW/var\fP)
315 /usr/include (standard include files)
316 /usr/lib (lib*.a from old \f(CW/usr/lib\fP)
317 /usr/libdata (databases from old \f(CW/usr/lib\fP)
318 /usr/libexec (executables from old \f(CW/usr/lib\fP)
319 /usr/local (locally added binaries used site-wide)
320 /usr/old (deprecated binaries)
321 /usr/sbin (root binaries)
322 /usr/share (mount point for site-wide shared text)
323 /usr/src (mount point for sources)
328 filesystem has the following directories:
331 /usr/share/calendar (various useful calendar files)
332 /usr/share/dict (dictionaries)
333 /usr/share/doc (\*(4B manual sources)
334 /usr/share/games (games text files)
335 /usr/share/groff_font (groff font information)
336 /usr/share/man (typeset manual pages)
337 /usr/share/misc (dumping ground for random text files)
338 /usr/share/mk (templates for \*(4B makefiles)
339 /usr/share/skel (template user home directory files)
340 /usr/share/tmac (various groff macro packages)
341 /usr/share/zoneinfo (information on time zones)
346 filesystem has the following directories:
349 /var/account (accounting files, formerly \f(CW/usr/adm\fP)
350 /var/at (\fIat\fP\|(1) spooling area)
351 /var/backups (backups of system files)
352 /var/crash (crash dumps)
353 /var/db (system-wide databases, e.g. tags)
354 /var/games (score files)
356 /var/mail (users mail)
357 /var/obj (hierarchy to build \f(CW/usr/src\fP)
358 /var/preserve (preserve area for vi)
359 /var/quotas (directory to store quota files)
360 /var/run (directory to store *.pid files)
361 /var/rwho (rwho databases)
362 /var/spool/ftp (home directory for anonymous ftp)
363 /var/spool/mqueue (sendmail spooling directory)
364 /var/spool/news (news spooling area)
365 /var/spool/output (printer spooling area)
366 /var/spool/uucp (uucp spooling area)
367 /var/tmp (disk-based temporary directory)
368 /var/users (root of per-machine user home directories)
371 The \*(4B bootstrap routines pass the identity of the boot device
372 through to the kernel.
373 The kernel then uses that device as its root filesystem.
374 Thus, for example, if you boot from
378 as its root filesystem. If
380 is configured as a swap partition,
381 it will be used as the initial swap area,
382 otherwise the normal primary swap area (\c
385 The \*(4B bootstrap is backward compatible with \*(Ps,
386 so you can replace your old bootstrap if you use it
387 to boot your first \*(4B kernel.
388 However, the \*(Ps bootstrap cannot access \*(4B filesystems,
389 so if you plan to convert your filesystems to \*(4B,
390 you must install a new bootstrap \fIbefore\fP doing the conversion.
391 Note that SPARC users cannot build a \*(4B compatible version
392 of the bootstrap, so must \fInot\fP convert their root filesystem
393 to the new \*(4B format.
395 Once you have extracted the \*(4B system and booted from it,
396 you will have to build a kernel customized for your configuration.
397 If you have any local device drivers,
398 they will have to be incorporated into the new kernel.
399 See section 4.1.3 and ``Building 4.3BSD UNIX Systems with Config'' (SMM:2).
401 If converting from \*(Ps, your old filesystems should be converted.
402 If you've modified the partition
403 sizes from the original \*(Ps ones, and are not already using the
404 \*(4B disk labels, you will have to modify the default disk partition
405 tables in the kernel. Make the necessary table changes and boot
406 your custom kernel \fBBEFORE\fP trying to access any of your old
407 filesystems! After doing this, if necessary, the remaining filesystems
408 may be converted in place by running the \*(4B version of
410 on each filesystem and allowing it to make the necessary corrections.
413 is more strict about the size of directories than
414 the version supplied with \*(Ps.
415 Thus the first time that it is run on a \*(Ps filesystem,
416 it will produce messages of the form:
418 \fBDIRECTORY ...: LENGTH\fP xx \fBNOT MULTIPLE OF 512 (ADJUSTED)\fP
420 Length ``xx'' will be the size of the directory;
421 it will be expanded to the next multiple of 512 bytes.
424 will also set default \fIinterleave\fP and
425 \fInpsect\fP (number of physical sectors per track) values on older
426 filesystems, in which these fields were unused spares; this correction
427 will produce messages of the form:
429 \fBIMPOSSIBLE INTERLEAVE=0 IN SUPERBLOCK (SET TO DEFAULT)\fP\**
430 \fBIMPOSSIBLE NPSECT=0 IN SUPERBLOCK (SET TO DEFAULT)\fP
433 The defaults are to set \fIinterleave\fP to 1 and
434 \fInpsect\fP to \fInsect\fP.
435 This is correct on most drives;
436 it affects only performance (usually virtually unmeasurably).
438 Filesystems that have had their interleave and npsect values
439 set will be diagnosed by the old
441 as having a bad superblock; the old
443 will run only if given an alternate superblock
445 in which case it will re-zero these fields.
446 The \*(4B kernel will internally set these fields to their defaults
447 if fsck has not done so; again, the \fI\-b32\fP option may be
448 necessary for running the old
451 In addition, \*(4B removes several limits on filesystem sizes
452 that were present in \*(Ps.
453 The limited filesystems
454 continue to work in \*(4B, but should be converted
455 as soon as it is convenient
458 with the \fI\-c 2\fP option.
459 The sequence \fIfsck \-p \-c 2\fP will update them all,
460 fix the interleave and npsect fields,
461 fix any incorrect directory lengths,
462 expand maximum uid's and gid's to 32-bits,
463 place symbolic links less than 60 bytes into their inode,
464 and fill in directory type fields all at once.
465 The new filesystem formats are incompatible with older systems.
466 If you wish to continue using these filesystems with the older
467 systems you should make only the compatible changes using
469 .Sh 2 "Merging your files from \*(Ps into \*(4B"
471 When your system is booting reliably and you have the \*(4B root and
473 filesystems fully installed you will be ready
474 to continue with the next step in the conversion process,
475 merging your old files into the new system.
477 If you saved the files on a
479 tape, extract them into a scratch directory, say
482 \fB#\fP \fImkdir /usr/convert\fP
483 \fB#\fP \fIcd /usr/convert\fP
487 The data files marked in the previous table with a dagger (\(dg)
488 may be used without change from the previous system.
489 Those data files marked with a double dagger (\(dd) have syntax
490 changes or substantial enhancements.
491 You should start with the \*(4B version and carefully
492 integrate any local changes into the new file.
493 Usually these local changes can be incorporated
494 without conflict into the new file;
495 some exceptions are noted below.
496 The files marked with an asterisk (*) require
497 particular attention and are discussed below.
499 As described in section 3.3,
500 the most immediately obvious change in \*(4B is the reorganization
501 of the system filesystems.
502 Users of certain recent vendor releases have seen this general organization,
503 although \*(4B takes the reorganization a bit further.
504 The directories most affected are
506 that now contains only system configuration files;
508 a new filesystem containing per-system spool and log files; and
510 that contains most of the text files shareable across architectures
511 such as documentation and macros.
512 System administration programs formerly in
518 Various programs and data files formerly in
525 Administrative files formerly in
529 and, similarly, log files are now in
535 and the sources for programs in
538 .Pn /usr/src/usr.bin .
539 Other source directories parallel the destination directories;
541 has been greatly expanded, and
544 The source for the manual pages, in general, are with the source
545 code for the applications they document.
546 Manual pages not closely corresponding to an application program
548 .Pn /usr/src/share/man .
549 The locations of all man pages is listed in
550 .Pn /usr/src/share/man/man0/man[1-8] .
553 has been updated and made more detailed;
554 it is included in the printed documentation.
555 You should review it to familiarize yourself with the new layout.
559 is provided to build and check filesystem hierarchies
560 with the proper contents, owners and permissions.
561 Scripts are provided in
564 .Pn /usr/src/etc/mtree )
570 Once a filesystem has been made for
573 can be used to create a directory hierarchy there
574 or you can simply use tar to extract the prototype from
575 the second file of the distribution tape.
576 .Sh 3 "Changes in the \f(CW/etc\fP directory"
580 directory now contains nearly all the host-specific configuration
582 Note that some file formats have changed,
583 and those configuration files containing pathnames are nearly all affected
584 by the reorganization.
585 See the examples provided in
590 The following table lists some of the local configuration files
591 whose locations and/or contents have changed.
595 \*(Ps and Earlier \*(4B Comments
597 /etc/fstab /etc/fstab new format; see below
598 /etc/inetd.conf /etc/inetd.conf pathnames of executables changed
599 /etc/printcap /etc/printcap pathnames changed
600 /etc/syslog.conf /etc/syslog.conf pathnames of log files changed
601 /etc/ttys /etc/ttys pathnames of executables changed
602 /etc/passwd /etc/master.passwd new format; see below
603 /usr/lib/sendmail.cf /etc/sendmail.cf changed pathnames
604 /usr/lib/aliases /etc/aliases may contain changed pathnames
605 /etc/*.pid /var/run/*.pid
611 New in \*(Ps-Tahoe \*(4B Comments
613 /usr/games/dm.config /etc/dm.conf configuration for games (see \fIdm\fP\|(8))
614 /etc/zoneinfo/localtime /etc/localtime timezone configuration
615 /etc/zoneinfo /usr/share/zoneinfo timezone configuration
621 New in \*(4B Comments
623 /etc/aliases.db database version of the aliases file
624 /etc/amd-home location database of home directories
625 /etc/amd-vol location database of exported filesystems
626 /etc/changelist \f(CW/etc/security\fP files to back up
627 /etc/csh.cshrc system-wide csh(1) initialization file
628 /etc/csh.login system-wide csh(1) login file
629 /etc/csh.logout system-wide csh(1) logout file
630 /etc/disklabels directory for saving disklabels
631 /etc/exports NFS list of export permissions
632 /etc/ftpwelcome message displayed for ftp users; see ftpd(8)
633 /etc/kerberosIV Kerberos directory; see below
634 /etc/man.conf lists directories searched by \fIman\fP\|(1)
635 /etc/mtree directory for local mtree files; see mtree(8)
636 /etc/netgroup NFS group list used in \f(CW/etc/exports\fP
637 /etc/pwd.db non-secure hashed user data base file
638 /etc/spwd.db secure hashed user data base file
639 /etc/security daily system security checker
642 System security changes require adding several new ``well-known'' groups to
644 The groups that are needed by the system as distributed are:
649 wheel 0 users allowed superuser privilege
650 daemon 1 processes that need less than wheel privilege
651 kmem 2 read access to kernel memory
652 sys 3 access to kernel sources
653 tty 4 access to terminals
654 operator 5 read access to raw disks
655 bin 7 group for system binaries
656 news 8 group for news
657 wsrc 9 write access to sources
658 games 13 access to games
659 staff 20 system staff
660 guest 31 system guests
661 nobody 39 the least privileged group
662 utmp 45 access to utmp files
663 dialer 117 access to remote ports and dialers
666 Only users in the ``wheel'' group are permitted to
669 Most programs that manage directories in
671 now run set-group-id to ``daemon'' so that users cannot
672 directly access the files in the spool directories.
673 The special files that access kernel memory,
677 are made readable only by group ``kmem''.
678 Standard system programs that require this access are
679 made set-group-id to that group.
680 The group ``sys'' is intended to control access to kernel sources,
681 and other sources belong to group ``wsrc.''
682 Rather than make user terminals writable by all users,
683 they are now placed in group ``tty'' and made only group writable.
684 Programs that should legitimately have access to write on user terminals
689 now run set-group-id to ``tty''.
690 The ``operator'' group controls access to disks.
691 By default, disks are readable by group ``operator'',
693 so that programs such as
695 can access the filesystem information without being set-user-id to ``root''.
698 program is executable only by group operator
699 and is setuid to root so that members of group operator may shut down
700 the system without root access.
702 The ownership and modes of some directories have changed.
705 programs now run set-user-id ``root'' instead of ``daemon.''
706 Also, the uucp directory no longer needs to be publicly writable,
709 reverts to privileged status to remove its lock files.
710 After copying your version of
714 \fB#\fP \fIchown \-R root /var/spool/at\fP
715 \fB#\fP \fIchown \-R uucp.daemon /var/spool/uucp\fP
716 \fB#\fP \fIchmod \-R o\-w /var/spool/uucp\fP
719 The format of the cron table,
721 has been changed to specify the user-id that should be used to run a process.
722 The userid ``nobody'' is frequently useful for non-privileged programs.
723 Local changes are now put in a separate file,
724 .Pn /etc/crontab.local .
726 Some of the commands previously in
730 several new functions are now handled by
735 You should look closely at the prototype version of these files
736 and read the manual pages for the commands contained in it
737 before trying to merge your local copy.
738 Note in particular that
740 has had many changes,
741 and that host names are now fully specified as domain-style names
742 (e.g., vangogh.CS.Berkeley.EDU) for the benefit of the name server.
744 Some of the commands previously in
748 and several new functions have been added to
750 to do nightly security checks on the system.
755 each night, and mails the output to the super-user.
756 Some of the checks done by
760 \(bu Syntax errors in the password and group files.
761 \(bu Duplicate user and group names and id's.
762 \(bu Dangerous search paths and umask values for the superuser.
763 \(bu Dangerous values in various initialization files.
764 \(bu Dangerous .rhosts files.
765 \(bu Dangerous directory and file ownership or permissions.
766 \(bu Globally exported filesystems.
767 \(bu Dangerous owners or permissions for special devices.
769 In addition, it reports any changes to setuid and setgid files, special
770 devices, or the files in
772 since the last run of
774 Backup copies of the files are saved in
776 Finally, the system binaries are checksummed and their permissions
777 validated against the
782 The C-library and system binaries on the distribution tape
783 are compiled with new versions of
787 that use the name server,
789 If you have only a small network and are not connected
790 to a large network, you can use the distributed library routines without
791 any problems; they use a linear scan of the host table
793 if the name server is not running.
794 If you are on the Internet or have a large local network,
795 it is recommend that you set up
796 and use the name server.
797 For instructions on how to set up the necessary configuration files,
798 refer to ``Name Server Operations Guide for BIND'' (SMM:10).
799 Several programs rely on the host name returned by
801 to determine the local domain name.
803 If you are using the name server, your
805 configuration file will need some updates to accommodate it.
806 See the ``Sendmail Installation and Operation Guide'' (SMM:8) and
809 configuration files in
810 .Pn /usr/src/usr.sbin/sendmail/cf .
813 has also been changed to add certain well-known addresses.
814 .Sh 3 "Shadow password files"
816 The password file format adds change and expiration fields
817 and its location has changed to protect
818 the encrypted passwords stored there.
819 The actual password file is now stored in
820 .Pn /etc/master.passwd .
821 The hashed dbm password files do not contain encrypted passwords,
822 but contain the file offset to the entry with the password in
823 .Pn /etc/master.passwd
824 (that is readable only by root).
829 functions will no longer return an encrypted password string to non-root
831 An old-style passwd file is created in
841 Several new users have also been added to the group of ``well-known'' users in
858 The ``daemon'' user is used for daemon processes that
859 do not need root privileges.
860 The ``operator'' user-id is used as an account for dumpers
861 so that they can log in without having the root password.
862 By placing them in the ``operator'' group,
863 they can get read access to the disks.
864 The ``uucp'' login has existed long before \*(4B,
865 and is noted here just to provide a common user-id.
866 The password entry ``nobody'' has been added to specify
867 the user with least privilege. The ``games'' user is a pseudo-user
868 that controls access to game programs.
870 After installing your updated password file, you must run
872 to create the password database.
878 .Sh 3 "The \f(CW/var\fP filesystem"
880 The spooling directories saved on tape may be restored in their
881 eventual resting places without too much concern. Be sure to
882 use the `\-p' option to
884 so that files are recreated with the same file modes.
885 The following commands provide a guide for copying spool and log files from
886 an existing system into a new
889 At least the following directories should already exist on
901 cd $SRC; tar cf - msgs preserve | (cd /var && tar xpf -)
905 # copy $SRC/spool to /var
907 tar cf - at mail rwho | (cd /var && tar xpf -)
908 tar cf - ftp mqueue news uucp uucppublic | \e
909 (cd /var/spool && tar xpf -)
913 # everything else in spool is probably a printer area
915 mv at ftp mail mqueue rwho uucp uucppublic .save
916 tar cf - * | (cd /var/spool/output && tar xpf -)
923 mv syslog.7 /var/log/maillog.7
924 mv syslog.6 /var/log/maillog.6
925 mv syslog.5 /var/log/maillog.5
926 mv syslog.4 /var/log/maillog.4
927 mv syslog.3 /var/log/maillog.3
928 mv syslog.2 /var/log/maillog.2
929 mv syslog.1 /var/log/maillog.1
930 mv syslog.0 /var/log/maillog.0
931 mv syslog /var/log/maillog
935 # move $SRC/adm to /var
937 tar cf - . | (cd /var/account && tar xpf -)
940 mv messages messages.[0-9] ../log
941 mv wtmp wtmp.[0-9] ../log
944 .Sh 2 "Bug fixes and changes between \*(Ps and \*(4B"
946 The major new facilities available in the \*(4B release are
947 a new virtual memory system,
948 the addition of ISO/OSI networking support,
949 a new virtual filesystem interface supporting filesystem stacking,
950 a freely redistributable implementation of NFS,
951 a log-structured filesystem,
952 enhancement of the local filesystems to support
953 files and filesystems that are up to 2^63 bytes in size,
954 enhanced security and system management support,
955 and the conversion to and addition of the IEEE Std1003.1 (``POSIX'')
956 facilities and many of the IEEE Std1003.2 facilities.
957 In addition, many new utilities and additions to the C
958 library are present as well.
959 The kernel sources have been reorganized to collect all machine-dependent
960 files for each architecture under one directory,
961 and most of the machine-independent code is now free of code
962 conditional on specific machines.
963 The user structure and process structure have been reorganized
964 to eliminate the statically-mapped user structure and to make most
965 of the process resources shareable by multiple processes.
966 The system and include files have been converted to be compatible
967 with ANSI C, including function prototypes for most of the exported
969 There are numerous other changes throughout the system.
970 .Sh 3 "Changes to the kernel"
972 This release includes several important structural kernel changes.
973 The kernel uses a new internal system call convention;
974 the use of global (``u-dot'') variables for parameters and error returns
976 and interrupted system calls no longer abort using non-local goto's (longjmp's).
977 A new sleep interface separates signal handling from scheduling priority,
978 returning characteristic errors to abort or restart the current system call.
979 This sleep call also passes a string describing the process state,
980 that is used by the ps(1) program.
981 The old sleep interface can be used only for non-interruptible sleeps.
982 The sleep interface (\fItsleep\fP) can be used at any priority,
983 but is only interruptible if the PCATCH flag is set.
984 When interrupted, \fItsleep\fP returns EINTR or ERESTART.
986 Many data structures that were previously statically allocated
987 are now allocated dynamically.
988 These structures include mount entries, file entries,
989 user open file descriptors, the process entries, the vnode table,
990 the name cache, and the quota structures.
992 To protect against indiscriminate reading or writing of kernel
993 memory, all writing and most reading of kernel data structures
994 must be done using a new ``sysctl'' interface.
995 The information to be accessed is described through an extensible
996 ``Management Information Base'' (MIB) style name,
997 described as a dotted set of components.
1000 retrieves kernel state and allows processes with appropriate
1001 privilege to set kernel state.
1004 The kernel runs with four different levels of security.
1005 Any superuser process can raise the security level, but only
1008 Security levels are defined as follows:
1010 Permanently insecure mode \- always run system in level 0 mode.
1012 Insecure mode \- immutable and append-only flags may be turned off.
1013 All devices may be read or written subject to their permissions.
1015 Secure mode \- immutable and append-only flags may not be cleared;
1016 disks for mounted filesystems,
1022 Highly secure mode \- same as secure mode, plus disks are always
1023 read-only whether mounted or not.
1024 This level precludes tampering with filesystems by unmounting them,
1025 but also inhibits running
1027 while the system is multi-user.
1030 and the \-\fBo\fP option to
1032 for information on setting and displaying the immutable and append-only
1035 Normally, the system runs in level 0 mode while single user
1036 and in level 1 mode while multiuser.
1037 If the level 2 mode is desired while running multiuser,
1038 it can be set in the startup script
1042 If it is desired to run the system in level 0 mode while multiuser,
1043 the administrator must build a kernel with the variable
1045 in the kernel source file
1046 .Pn /sys/kern/kern_sysctl.c
1048 .Sh 4 "Virtual memory changes"
1050 The new virtual memory implementation is derived from the Mach
1051 operating system developed at Carnegie-Mellon,
1052 and was ported to the BSD kernel at the University of Utah.
1053 It is based on the 2.0 release of Mach
1054 (with some bug fixes from the 2.5 and 3.0 releases)
1055 and retains many of its essential features such as
1056 the separation of the machine dependent and independent layers
1057 (the ``pmap'' interface),
1058 efficient memory utilization using copy-on-write
1059 and other lazy-evaluation techniques,
1060 and support for large, sparse address spaces.
1061 It does not include the ``external pager'' interface instead using
1062 a primitive internal pager interface.
1063 The Mach virtual memory system call interface has been replaced with the
1064 ``mmap''-based interface described in the ``Berkeley Software
1065 Architecture Manual'' (see UNIX Programmer's Manual,
1066 Supplementary Documents, PSD:5).
1067 The interface is similar to the interfaces shipped
1068 by several commercial vendors such as Sun, USL, and Convex Computer Corp.
1069 The integration of the new virtual memory is functionally complete,
1070 but still has serious performance problems under heavy memory load.
1071 The internal kernel interfaces have not yet been completed
1072 and the memory pool and buffer cache have not been merged.
1073 Some additional caveats:
1075 Since the code is based on the 2.0 release of Mach,
1076 bugs and misfeatures of the BSD version should not be considered
1077 short-comings of the current Mach virtual memory system.
1079 Because of the disjoint virtual memory (page) and IO (buffer) caches,
1080 it is possible to see inconsistencies if using both the mmap and
1081 read/write interfaces on the same file simultaneously.
1083 Swap space is allocated on-demand rather than up front and no
1084 allocation checks are performed so it is possible to over-commit
1085 memory and eventually deadlock.
1087 The semantics of the
1089 system call are slightly different.
1090 The synchronization between parent and child is preserved,
1091 but the memory sharing aspect is not.
1092 In practice this has been enough for backward compatibility,
1093 but newer code should just use
1095 .Sh 4 "Networking additions and changes"
1097 The ISO/OSI Networking consists of a kernel implementation of
1098 transport class 4 (TP-4),
1099 connectionless networking protocol (CLNP),
1100 and 802.3-based link-level support (hardware-compatible with Ethernet\**).
1102 Ethernet is a trademark of the Xerox Corporation.
1104 We also include support for ISO Connection-Oriented Network Service,
1106 The session and presentation layers are provided outside
1107 the kernel using the ISO Development Environment by Marshall Rose,
1108 that is available via anonymous FTP
1109 (but is not included on the distribution tape).
1110 Included in this development environment are file
1111 transfer and management (FTAM), virtual terminals (VT),
1112 a directory services implementation (X.500),
1113 and miscellaneous other utilities.
1115 Kernel support for the ISO OSI protocols is enabled with the ISO option
1116 in the kernel configuration file.
1119 manual page describes the protocols and addressing;
1125 The OSI equivalent to ARP is ESIS (End System to Intermediate System Routing
1126 Protocol); running this protocol is mandatory, however one can manually add
1127 translations for machines that do not participate by use of the
1130 Additional information is provided in the manual page describing
1135 has a new syntax and several new capabilities:
1136 it can install routes with a specified destination and mask,
1137 and can change route characteristics such as hop count, packet size
1140 Several important enhancements have been added to the TCP/IP
1141 protocols including TCP header prediction and
1142 serial line IP (SLIP) with header compression.
1143 The routing implementation has been completely rewritten
1144 to use a hierarchical routing tree with a mask per route
1145 to support the arbitrary levels of routing found in the ISO protocols.
1146 The routing table also stores and caches route characteristics
1147 to speed the adaptation of the throughput and congestion avoidance
1152 structure (the structure used to describe a generic network address with an
1153 address family and family-specific data)
1154 has changed from previous releases,
1155 as have the address family-specific versions of this structure.
1158 family field has been split into a length,
1162 System calls that pass a
1164 structure into the kernel (e.g.
1168 have a separate parameter that specifies the
1170 length, and thus it is not necessary to fill in the
1172 field for those system calls.
1173 System calls that pass a
1175 structure back from the kernel (e.g.
1179 receive a completely filled-in
1181 structure, thus the length field is valid.
1182 Because this would not work for old binaries,
1183 the new library uses a different system call number.
1184 Thus, most networking programs compiled under \*(4B are incompatible
1187 Although this change is mostly source and binary compatible
1188 with old programs, there are three exceptions.
1189 Programs with statically initialized
1192 (usually the Internet form, a
1195 Generally, such programs should be changed to fill in the structure
1196 at run time, as C allows no way to initialize a structure without
1197 assuming the order and number of fields.
1198 Also, programs with use structures to describe a network packet format
1199 that contain embedded
1201 structures also require change; a definition of an
1203 structure is provided for this purpose.
1204 Finally, programs that use the
1206 ioctl to get a complete list of interface addresses
1209 field when iterating through the array of addresses returned,
1210 as not all the structures returned have the same length
1211 (this variance in length is nearly guaranteed by the presence of link-layer
1212 address structures).
1214 .Sh 4 "Additions and changes to filesystems"
1216 The \*(4B distribution contains most of the interfaces
1217 specified in the IEEE Std1003.1 system interface standard.
1218 Filesystem additions include IEEE Std1003.1 FIFOs,
1219 byte-range file locking, and saved user and group identifiers.
1221 A new virtual filesystem interface has been added to the
1222 kernel to support multiple filesystems.
1223 In comparison with other interfaces,
1224 the Berkeley interface has been structured for more efficient support
1225 of filesystems that maintain state (such as the local filesystem).
1226 The interface has been extended with support for stackable
1227 filesystems done at UCLA.
1228 These extensions allow for filesystems to be layered on top of each
1229 other and allow new vnode operations to be added without requiring
1230 changes to existing filesystem implementations.
1232 the umap filesystem (see
1234 is used to mount a sub-tree of an existing filesystem
1235 that uses a different set of uids and gids than the local system.
1236 Such a filesystem could be mounted from a remote site via NFS or it
1237 could be a filesystem on removable media brought from some foreign
1238 location that uses a different password file.
1240 Other new filesystems that may be stacked include the loopback filesystem
1242 the kernel filesystem
1243 .Xr mount_kernfs (8),
1244 and the portal filesystem
1245 .Xr mount_portal (8).
1247 The buffer cache in the kernel is now organized as a file block cache
1248 rather than a device block cache.
1249 As a consequence, cached blocks from a file
1250 and from the corresponding block device would no longer be kept consistent.
1251 The block device thus has little remaining value.
1252 Three changes have been made for these reasons:
1254 block devices may not be opened while they are mounted,
1255 and may not be mounted while open, so that the two versions of cached
1256 file blocks cannot be created,
1258 filesystem checks of the root now use the raw device
1259 to access the root filesystem, and
1261 the root filesystem is initially mounted read-only
1262 so that nothing can be written back to disk during or after change to
1263 the raw filesystem by
1266 The root filesystem may be made writable while in single-user mode
1272 The mount command has an option to update the flags on a mounted filesystem,
1273 including the ability to upgrade a filesystem from read-only to read-write
1274 or downgrade it from read-write to read-only.
1276 In addition to the local ``fast filesystem'',
1277 we have added an implementation of the network filesystem (NFS)
1278 that fully interoperates with the NFS shipped by Sun and its licensees.
1279 Because our NFS implementation was implemented
1280 by Rick Macklem of the University of Guelph
1281 using only the publicly available NFS specification,
1282 it does not require a license from Sun to use in source or binary form.
1283 By default it runs over UDP to be compatible with Sun's implementation.
1284 However, it can be configured on a per-mount basis to run over TCP.
1285 Using TCP allows it to be used quickly and efficiently through
1286 gateways and over long-haul networks.
1287 Using an extended protocol, it supports Leases to allow a limited
1288 callback mechanism that greatly reduces the network traffic necessary
1289 to maintain cache consistency between the server and its clients.
1290 Its use will be familiar to users of other implementations of NFS.
1291 See the manual pages
1301 and the document ``The 4.4BSD NFS Implementation'' (SMM:6)
1302 for further information.
1305 has changed from previous \*(Bs releases
1306 to a blank-separated format to allow colons in pathnames.
1308 A new local filesystem, the log-structured filesystem (LFS),
1309 has been added to the system.
1310 It provides near disk-speed output and fast crash recovery.
1311 This work is based, in part, on the LFS filesystem created
1312 for the Sprite operating system at Berkeley.
1313 While the kernel implementation is almost complete,
1314 only some of the utilities to support the
1315 filesystem have been written,
1316 so we do not recommend it for production use.
1321 .Xr lfs_cleanerd (8)
1322 for more information.
1323 For a in-depth description of the implementation and performance
1324 characteristics of log-structured filesystems in general,
1325 and this one in particular, see Dr. Margo Seltzer's doctoral thesis,
1326 available from the University of California Computer Science Department.
1328 We have also added a memory-based filesystem that runs in
1329 pageable memory, allowing large temporary filesystems without
1330 requiring dedicated physical memory.
1332 The local ``fast filesystem'' has been enhanced to do
1333 clustering that allows large pieces of files to be
1334 allocated contiguously resulting in near doubling
1335 of filesystem throughput.
1336 The filesystem interface has been extended to allow
1337 files and filesystems to grow to 2^63 bytes in size.
1338 The quota system has been rewritten to support both
1339 user and group quotas (simultaneously if desired).
1340 Quota expiration is based on time rather than
1341 the previous metric of number of logins over quota.
1342 This change makes quotas more useful on fileservers
1343 onto which users seldom login.
1345 The system security has been greatly enhanced by the
1346 addition of additional file flags that permit a file to be
1347 marked as immutable or append only.
1348 Once set, these flags can only be cleared by the super-user
1349 when the system is running in insecure mode (normally, single-user).
1350 In addition to the immutable and append-only flags,
1351 the filesystem supports a new user-settable flag ``nodump''.
1352 (File flags are set using the
1357 will omit the file from incremental backups
1358 but retain them on full backups.
1359 See the ``-h'' flag to
1361 for details on how to change this default.
1362 The ``nodump'' flag is usually set on core dumps,
1363 system crash dumps, and object files generated by the compiler.
1364 Note that the flag is not preserved when files are copied
1365 so that installing an object file will cause it to be preserved.
1367 The filesystem format used in \*(4B has several additions.
1368 Directory entries have an additional field,
1370 that identifies the type of the entry
1371 (normally found in the
1376 This field is particularly useful for identifying
1377 directories without the need to use
1380 Short (less than sixty byte) symbolic links are now stored
1381 in the inode itself rather than in a separate data block.
1382 This saves disk space and makes access of symbolic links faster.
1383 Short symbolic links are not given a special type,
1384 so a user-level application is unaware of their special treatment.
1385 Unlike pre-\*(4B systems, symbolic links do
1386 not have an owner, group, access mode, times, etc.
1387 Instead, these attributes are taken from the directory that contains the link.
1388 The only attributes returned from an
1390 that refer to the symbolic link itself are the file type (S_IFLNK),
1391 size, blocks, and link count (always 1).
1393 An implementation of an auto-mounter daemon,
1395 was contributed by Jan-Simon Pendry of the
1396 Imperial College of Science, Technology & Medicine.
1397 See the document ``AMD \- The 4.4BSD Automounter'' (SMM:13)
1398 for further information.
1402 contains special files
1406 that, when opened, duplicate the corresponding file descriptor.
1412 refer to file descriptors 0, 1 and 2.
1417 for more information.
1418 .Sh 4 "POSIX terminal driver changes"
1420 The \*(4B system uses the IEEE P1003.1 (POSIX.1) terminal interface
1421 rather than the previous \*(Bs terminal interface.
1422 The terminal driver is similar to the System V terminal driver
1423 with the addition of the necessary extensions to get the
1424 functionality previously available in the \*(Ps terminal driver.
1427 calls and old options to
1430 This emulation is expected to be unavailable in many vendors releases,
1431 so conversion to the new interface is encouraged.
1433 \*(4B also adds the IEEE Std1003.1 job control interface,
1434 that is similar to the \*(Ps job control interface,
1435 but adds a security model that was missing in the
1436 \*(Ps job control implementation.
1439 creates a job-control session consisting of a single process
1440 group with one member, the caller, that becomes a session leader.
1441 Only a session leader may acquire a controlling terminal.
1442 This is done explicitly via a
1445 call, not implicitly by an
1448 The call fails if the terminal is in use.
1449 Programs that allocate controlling terminals (or pseudo-terminals)
1450 require change to work in this environment.
1453 provided in the X11R5 release includes the necessary changes.
1454 New library routines are available for allocating and initializing
1455 pseudo-terminals and other terminals as controlling terminal; see
1456 .Pn /usr/src/lib/libutil/pty.c
1458 .Pn /usr/src/lib/libutil/login_tty.c .
1460 The POSIX job control model formalizes the previous conventions
1461 used in setting up a process group.
1462 Unfortunately, this requires that changes be made in a defined order
1463 and with some synchronization that were not necessary in the past.
1464 Older job control shells (csh, ksh) will generally not operate correctly
1465 with the new system.
1467 Most of the other kernel interfaces have been changed to correspond
1468 with the POSIX.1 interface, although that work is not complete.
1469 See the relevant manual pages and the IEEE POSIX standard.
1471 .Sh 4 "Native operating system compatibility"
1473 Both the HP300 and SPARC ports feature the ability to run binaries
1474 built for the native operating system (HP-UX or SunOS) by emulating
1476 Building an HP300 kernel with the HPUXCOMPAT and COMPAT_OHPUX options
1477 or a SPARC kernel with the COMPAT_SUNOS option will enable this feature
1478 (on by default in the generic kernel provided in the root filesystem image).
1479 Though this native operating system compatibility was provided by the
1480 developers as needed for their purposes and is by no means complete,
1481 it is complete enough to run several non-trivial applications including
1482 those that require HP-UX or SunOS shared libraries.
1483 For example, the vendor supplied X11 server and windowing environment
1484 can be used on both the HP300 and SPARC.
1486 It is important to remember that merely copying over a native binary
1487 and executing it (or executing it directly across NFS) does not imply
1489 All but the most trivial of applications are likely to require access
1490 to auxiliary files that do not exist under \*(4B (e.g.
1491 .Pn /etc/ld.so.cache )
1492 or have a slightly different format (e.g.
1494 However, by using system call tracing and
1495 through creative use of symlinks,
1496 many problems can be tracked down and corrected.
1498 The DECstation port also has code for ULTRIX emulation
1499 (kernel option ULTRIXCOMPAT, not compiled into the generic kernel)
1500 but it was used primarily for initially bootstrapping the port and
1501 has not been used since.
1502 Hence, some work may be required to make it generally useful.
1503 .Sh 3 "Changes to the utilities"
1505 We have been tracking the IEEE Std1003.2 shell and utility work
1506 and have included prototypes of many of the proposed utilities
1507 based on draft 12 of the POSIX.2 Shell and Utilities document.
1508 Because most of the traditional utilities have been replaced
1509 with implementations conformant to the POSIX standards,
1510 you should realize that the utility software may not be as stable,
1511 reliable or well documented as in traditional Berkeley releases.
1512 In particular, almost the entire manual suite has been rewritten to
1513 reflect the POSIX defined interfaces, and in some instances
1514 it does not correctly reflect the current state of the software.
1515 It is also worth noting that, in rewriting this software, we have generally
1516 been rewarded with significant performance improvements.
1517 Most of the libraries and header files have been converted
1518 to be compliant with ANSI C.
1519 The shipped compiler (gcc) is a superset of ANSI C,
1520 but supports traditional C as a command-line option.
1521 The system libraries and utilities all compile
1522 with either ANSI or traditional C.
1523 .Sh 4 "Make and Makefiles"
1525 This release uses a completely new version of the
1527 program derived from the
1529 program developed by the Sprite project at Berkeley.
1530 It supports existing makefiles, although certain incorrect makefiles
1532 The makefiles for the \*(4B sources make extensive use of the new
1533 facilities, especially conditionals and file inclusion, and are thus
1534 completely incompatible with older versions of
1536 (but nearly all the makefiles are now trivial!).
1537 The standard include files for
1544 .Pn /usr/src/share/mk .
1546 Another global change supported by the new
1548 is designed to allow multiple architectures to share a copy of the sources.
1549 If a subdirectory named
1551 is present in the current directory,
1553 descends into that directory and creates all object and other files there.
1554 We use this by building a directory hierarchy in
1562 as symbolic links to the corresponding directories in
1564 (This step is automated.
1565 The command ``make obj'' in
1567 builds both the local symlink and the shadow directory,
1570 that may be a symbolic link, as the root of the shadow tree.
1573 is for historic reasons only, and the system make configuration files in
1575 can trivially be modified to use
1580 hierarchy on the local system, and another on each
1581 system that shares the source filesystem.
1585 .Pn /usr/src/contrib
1588 have been converted to use the new make and
1591 this change allows compilation for multiple
1592 architectures from the same source tree
1593 (that may be mounted read-only).
1596 The Kerberos authentication server from MIT (version 4)
1597 is included in this release.
1600 for a general, if MIT-specific, introduction.
1601 If it is configured,
1607 will all begin to use it automatically.
1609 .Pn /etc/kerberosIV/README
1610 describes the configuration.
1611 Each system needs the file
1612 .Pn /etc/kerberosIV/krb.conf
1613 to set its realm and local servers,
1614 and a private key stored in
1615 .Pn /etc/kerberosIV/srvtab
1617 .Xr ext_srvtab (8)).
1618 The Kerberos server should be set up on a single, physically secure,
1620 Users and hosts may be added to the server database manually with
1622 or users on authorized hosts can add themselves and a Kerberos
1623 password after verification of their ``local'' (passwd-file) password
1628 Note that by default the password-changing program
1630 changes the Kerberos password, that must exist.
1635 changes the ``local'' password if one exists.
1637 Note that Version 5 of Kerberos will be released soon;
1638 Version 4 should probably be replaced at that time.
1639 .Sh 4 "Timezone support"
1641 The timezone conversion code in the C library uses data files installed in
1642 .Pn /usr/share/zoneinfo
1643 to convert from ``GMT'' to various timezones. The data file for the default
1644 timezone for the system should be copied to
1645 .Pn /etc/localtime .
1646 Other timezones can be selected by setting the TZ environment variable.
1648 The data files initially installed in
1649 .Pn /usr/share/zoneinfo
1650 include corrections for leap seconds since the beginning of 1970.
1651 Thus, they assume that the
1652 kernel will increment the time at a constant rate during a leap second;
1653 that is, time just keeps on ticking. The conversion routines will then
1654 name a leap second 23:59:60. For purists, this effectively means that
1655 the kernel maintains TAI (International Atomic Time) rather than UTC
1656 (Coordinated Universal Time, aka GMT).
1658 For systems that run current NTP (Network Time Protocol) implementations
1659 or that wish to conform to the letter of the POSIX.1 law, it is possible
1660 to rebuild the timezone data files so that leap seconds are not counted.
1661 (NTP causes the time to jump over a leap second, and POSIX effectively
1662 requires the clock to be reset by hand when a leap second occurs.
1663 In this mode, the kernel effectively runs UTC rather than TAI.)
1665 The data files without leap second information
1666 are constructed from the source directory,
1667 .Pn /usr/src/share/zoneinfo .
1668 Change the variable REDO in Makefile
1669 from ``right'' to ``posix'', and then do
1671 make obj (if necessary)
1676 You will then need to copy the correct default zone file to
1677 .Pn /etc/localtime ,
1678 as the old one would still have used leap seconds, and because the Makefile
1681 each time ``make install'' is done.
1683 It is possible to install both sets of timezone data files. This results
1685 .Pn /usr/share/zoneinfo/right
1687 .Pn /usr/share/zoneinfo/posix .
1688 Each contain a complete set of zone files.
1690 .Pn /usr/src/share/zoneinfo/Makefile
1692 .Sh 4 "Additions and changes to the libraries"
1694 Notable additions to the libraries include functions to traverse a
1695 filesystem hierarchy, database interfaces to btree and hashing functions,
1696 a new, faster implementation of stdio and a radix and merge sort
1701 functions will do either physical or logical traversal of
1702 a file hierarchy as well as handle essentially infinite depth
1703 filesystems and filesystems with cycles.
1704 All the utilities in \*(4B which traverse file hierarchies
1705 have been converted to use
1707 The conversion has always resulted in a significant performance
1708 gain, often of four or five to one in system time.
1712 functions are intended to be a family of database access methods.
1713 Currently, they consist of
1715 an extensible, dynamic hashing scheme,
1717 a sorted, balanced tree structure (B+tree's), and
1719 a flat-file interface for fixed or variable length records
1720 referenced by logical record number.
1721 Each of the access methods stores associated key/data pairs and
1722 uses the same record oriented interface for access.
1726 function has been rewritten for additional performance.
1727 In addition, three new types of sorting functions,
1732 have been added to the system.
1735 function is optimized for data with pre-existing order,
1736 in which case it usually significantly outperforms
1740 functions are variants of most-significant-byte radix sorting.
1741 They take time linear to the number of bytes to be
1742 sorted, usually significantly outperforming
1744 on data that can be sorted in this fashion.
1745 An implementation of the POSIX 1003.2 standard
1750 .Pn /usr/src/contrib/sort .
1752 Some additional comments about the \*(4B C library:
1754 The floating point support in the C library has been replaced
1755 and is now accurate.
1757 The C functions specified by both ANSI C, POSIX 1003.1 and
1758 1003.2 are now part of the C library.
1759 This includes support for file name matching, shell globbing
1760 and both basic and extended regular expressions.
1762 ANSI C multibyte and wide character support has been integrated.
1763 The rune functionality from the Bell Labs' Plan 9 system is provided
1768 functions have been generalized and replaced with a general
1769 purpose interface named
1774 routines have been replaced, and are usually much faster.
1777 interface permits applications to provide their own I/O stream
1782 library has been largely rewritten.
1783 Important additional features include support for scrolling and
1786 An application front-end editing library, named libedit, has been
1787 added to the system.
1789 A superset implementation of the SunOS kernel memory interface library,
1790 libkvm, has been integrated into the system.
1792 .Sh 4 "Additions and changes to other utilities"
1794 There are many new utilities, offering many new capabilities,
1796 Skimming through the section 1 and section 8 manual pages is sure
1798 The additions to the utility suite include greatly enhanced versions of
1799 programs that display system status information, implementations of
1800 various traditional tools described in the IEEE Std1003.2 standard,
1801 new tools not previous available on Berkeley UNIX systems,
1803 Also, with only a very few exceptions, all the utilities from
1804 \*(Ps that included proprietary source code have been replaced,
1805 and their \*(4B counterparts are freely redistributable.
1806 Normally, this replacement resulted in significant performance
1807 improvements and the increase of the limits imposed on data by
1808 the utility as well.
1810 A summary of specific additions and changes are as follows:
1813 amd An auto-mounter implementation.
1814 ar Replacement of the historic archive format with a new one.
1815 awk Replaced by gawk; see /usr/src/old/awk for the historic version.
1816 bdes Utility implementing DES modes of operation described in FIPS PUB 81.
1817 calendar Addition of an interface for system calendars.
1818 cap_mkdb Utility for building hashed versions of termcap style databases.
1819 cc Replacement of pcc with gcc suite.
1820 chflags A utility for setting the per-file user and system flags.
1821 chfn An editor based replacement for changing user information.
1822 chpass An editor based replacement for changing user information.
1823 chsh An editor based replacement for changing user information.
1824 cksum The POSIX 1003.2 checksum utility; compatible with sum.
1825 column A columnar text formatting utility.
1826 cp POSIX 1003.2 compatible, able to copy special files.
1827 csh Freely redistributable and 8-bit clean.
1828 date User specified formats added.
1829 dd New EBCDIC conversion tables, major performance improvements.
1830 dev_mkdb Hashed interface to devices.
1832 find Several new options and primaries, major performance improvements.
1833 fstat Utility displaying information on files open on the system.
1834 ftpd Connection logging added.
1835 hexdump A binary dump utility, superseding od.
1836 id The POSIX 1003.2 user identification utility.
1838 jot A text formatting utility.
1839 kdump A system-call tracing facility.
1840 ktrace A system-call tracing facility.
1841 kvm_mkdb Hashed interface to the kernel name list.
1842 lam A text formatting utility.
1843 lex A new, freely redistributable, significantly faster version.
1844 locate A database of the system files, by name, constructed weekly.
1845 logname The POSIX 1003.2 user identification utility.
1846 mail.local New local mail delivery agent, replacing mail.
1847 make Replaced with a new, more powerful make, supporting include files.
1848 man Added support for man page location configuration.
1849 mkdep A new utility for generating make dependency lists.
1850 mkfifo The POSIX 1003.2 FIFO creation utility.
1851 mtree A new utility for mapping file hierarchies to a file.
1852 nfsstat An NFS statistics utility.
1853 nvi A freely redistributable replacement for the ex/vi editors.
1854 pax The POSIX 1003.2 replacement for cpio and tar.
1855 printf The POSIX 1003.2 replacement for echo.
1856 roff Replaced by groff; see /usr/src/old/roff for the historic versions.
1857 rs New utility for text formatting.
1858 shar An archive building utility.
1859 sysctl MIB-style interface to system state.
1860 tcopy Fast tape-to-tape copying and verification.
1861 touch Time and file reference specifications.
1862 tput The POSIX 1003.2 terminal display utility.
1863 tr Addition of character classes.
1864 uname The POSIX 1003.2 system identification utility.
1865 vis A filter for converting and displaying non-printable characters.
1866 xargs The POSIX 1003.2 argument list constructor utility.
1867 yacc A new, freely redistributable, significantly faster version.
1874 (``zoo'') should be installed early on if attempting to
1875 cross-compile \*(4B on another system.
1878 program is not completely backward compatible with historic versions of
1880 although it is believed that all documented features are supported.
1884 utility has two new options that are important to be aware of if you
1886 The ``fstype'' and ``prune'' options can be used together to prevent
1887 find from crossing NFS mount points.
1890 for an example of their use.
1891 .Sh 2 "Hints on converting from \*(Ps to \*(4B"
1893 This section summarizes changes between
1894 \*(Ps and \*(4B that are likely to
1895 cause difficulty in doing the conversion.
1896 It does not include changes in the network;
1897 see section 5 for information on setting up the network.
1899 Since the stat st_size field is now 64-bits instead of 32,
1900 doing something like:
1905 and then (improperly) defining foo with an ``int'' or ``long'' parameter:
1914 will fail miserably (well, it might work on a little endian machine).
1915 This problem showed up in
1917 as well as several other programs.
1918 A related problem is improperly casting (or failing to cast)
1919 the second argument to
1927 lseek(fd, (long)off, 0);
1934 The best solution is to include
1936 which has prototypes that catch these types of errors.
1938 Determining the ``namelen'' parameter for a
1940 call on a unix domain socket should use the ``SUN_LEN'' macro from
1942 One old way that was used:
1945 addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family);
1947 no longer works as there is an additional
1951 The kernel's limit on the number of open files has been
1952 increased from 20 to 64.
1953 It is now possible to change this limit almost arbitrarily.
1954 The standard I/O library
1955 autoconfigures to the kernel limit.
1956 Note that file (``_iob'') entries may be allocated by
1960 this allocation has been known to cause problems with programs
1961 that use their own memory allocators.
1962 Memory allocation does not occur until after 20 files have been opened
1963 by the standard I/O library.
1966 can be used with more than 32 descriptors
1967 by using arrays of \fBint\fPs for the bit fields rather than single \fBint\fPs.
1970 as their first argument to
1972 will no longer work correctly.
1973 Usually the program can be modified to correctly specify the number
1974 of bits in an \fBint\fP.
1975 Alternatively the program can be modified to use an array of \fBint\fPs.
1976 There are a set of macros available in
1982 Old core files will not be intelligible by the current debuggers
1983 because of numerous changes to the user structure
1984 and because the kernel stack has been enlarged.
1987 header that was in the user structure is no longer present.
1988 Locally-written debuggers that try to check the magic number
1989 will need to be changed.
1991 Files may not be deleted from directories having the ``sticky'' (ISVTX) bit
1993 except by the owner of the file or of the directory, or by the superuser.
1994 This is primarily to protect users' files in publicly-writable directories
1999 All publicly-writable directories should have their ``sticky'' bits set
2002 The following two sections contain additional notes about
2003 changes in \*(4B that affect the installation of local files;
2004 be sure to read them as well.