Fri Jun 4 11:48:18 2021 UTC ()
adjust layout of afterboot(8) to make things easier to find


(nia)
diff -r1.77 -r1.78 src/share/man/man8/afterboot.8

cvs diff -r1.77 -r1.78 src/share/man/man8/afterboot.8 (expand / switch to unified diff)

--- src/share/man/man8/afterboot.8 2021/06/04 11:33:18 1.77
+++ src/share/man/man8/afterboot.8 2021/06/04 11:48:18 1.78
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: afterboot.8,v 1.77 2021/06/04 11:33:18 nia Exp $ 1.\" $NetBSD: afterboot.8,v 1.78 2021/06/04 11:48:18 nia Exp $
2.\" $OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $ 2.\" $OpenBSD: afterboot.8,v 1.72 2002/02/22 02:02:33 miod Exp $
3.\" 3.\"
4.\" Originally created by Marshall M. Midden -- 1997-10-20, m4@umn.edu 4.\" Originally created by Marshall M. Midden -- 1997-10-20, m4@umn.edu
5.\" Adapted to NetBSD by Julio Merino -- 2002-05-10, jmmv@NetBSD.org 5.\" Adapted to NetBSD by Julio Merino -- 2002-05-10, jmmv@NetBSD.org
6.\" 6.\"
7.\" 7.\"
8.\" Copyright (c) 2002-2008 The NetBSD Foundation, Inc. 8.\" Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
9.\" All rights reserved. 9.\" All rights reserved.
10.\" 10.\"
11.\" Redistribution and use in source and binary forms, with or without 11.\" Redistribution and use in source and binary forms, with or without
12.\" modification, are permitted provided that the following conditions 12.\" modification, are permitted provided that the following conditions
13.\" are met: 13.\" are met:
14.\" 1. Redistributions of source code must retain the above copyright 14.\" 1. Redistributions of source code must retain the above copyright
@@ -150,28 +150,31 @@ after fresh install in @@ -150,28 +150,31 @@ after fresh install in
150Upon successful login on the console, you may see the message 150Upon successful login on the console, you may see the message
151.Dq We recommend creating a non-root account... . 151.Dq We recommend creating a non-root account... .
152For security reasons, it is bad practice to login as root during 152For security reasons, it is bad practice to login as root during
153regular use and maintenance of the system. 153regular use and maintenance of the system.
154In fact, the system will only let you login as root on a secure 154In fact, the system will only let you login as root on a secure
155terminal. 155terminal.
156By default, only the console is considered to be a secure terminal. 156By default, only the console is considered to be a secure terminal.
157Instead, administrators are encouraged to add a 157Instead, administrators are encouraged to add a
158.Dq regular 158.Dq regular
159user, add said user to the 159user, add said user to the
160.Dq wheel 160.Dq wheel
161group, then use the 161group, then use the
162.Xr su 1 162.Xr su 1
163command when root privileges are required. 163command when root privileges are required:
164This process is described in more detail later. 164.Bd -literal -offset indent
 165.Ic useradd -G wheel -m myuser
 166.Ic passwd myuser
 167.Ed
165.Ss Root password 168.Ss Root password
166Change the password for the root user. 169Change the password for the root user.
167(Note that throughout the documentation, the term 170(Note that throughout the documentation, the term
168.Dq superuser 171.Dq superuser
169is a synonym for the root user.) 172is a synonym for the root user.)
170Choose a password that has numbers, digits, and special characters (not space) 173Choose a password that has numbers, digits, and special characters (not space)
171as well as from the upper and lower case alphabet. 174as well as from the upper and lower case alphabet.
172Do not choose any word in any language. 175Do not choose any word in any language.
173It is common for an intruder to use dictionary attacks. 176It is common for an intruder to use dictionary attacks.
174Type the command 177Type the command
175.Ic /usr/bin/passwd 178.Ic /usr/bin/passwd
176to change it. 179to change it.
177.Pp 180.Pp
@@ -197,27 +200,27 @@ to the correct time zone in the @@ -197,27 +200,27 @@ to the correct time zone in the
197.Pa /usr/share/zoneinfo 200.Pa /usr/share/zoneinfo
198directory. 201directory.
199.Pp 202.Pp
200Examples: 203Examples:
201.Bl -tag -width date 204.Bl -tag -width date
202.It Cm date 202010051820 205.It Cm date 202010051820
203Set the current date to October 5th, 2020 6:20pm. 206Set the current date to October 5th, 2020 6:20pm.
204.It Cm ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime 207.It Cm ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
205Set the time zone to Eastern Europe Summer Time. 208Set the time zone to Eastern Europe Summer Time.
206.El 209.El
207.Ss Console settings 210.Ss Console settings
208One of the first things you will likely need to do is to set up your 211One of the first things you will likely need to do is to set up your
209keyboard map (and maybe some other aspects about the system console). 212keyboard map (and maybe some other aspects about the system console).
210To change your keyboard encoding, edit the 213To change your keyboard layout, edit the
211.Dq Va encoding 214.Dq Va encoding
212variable found in 215variable found in
213.Pa /etc/wscons.conf . 216.Pa /etc/wscons.conf .
214.Pp 217.Pp
215.Xr wscons.conf 5 218.Xr wscons.conf 5
216contains more information about this file. 219contains more information about this file.
217.Ss Check hostname 220.Ss Check hostname
218Use the 221Use the
219.Ic hostname 222.Ic hostname
220command to verify that the name of your machine is correct. 223command to verify that the name of your machine is correct.
221See the man page for 224See the man page for
222.Xr hostname 1 225.Xr hostname 1
223if it needs to be changed. 226if it needs to be changed.
@@ -412,27 +415,29 @@ and then starting the server with the co @@ -412,27 +415,29 @@ and then starting the server with the co
412The first time the server is started, it will generate a new keypair, 415The first time the server is started, it will generate a new keypair,
413which will be stored inside the directory 416which will be stored inside the directory
414.Pa /etc/ssh . 417.Pa /etc/ssh .
415.Ss Host names and DNS 418.Ss Host names and DNS
416The system resolves host names according the rules for hosts in the 419The system resolves host names according the rules for hosts in the
417name service switch configuration at 420name service switch configuration at
418.Pa /etc/nsswitch.conf . 421.Pa /etc/nsswitch.conf .
419By default, it will query 422By default, it will query
420.Pa /etc/hosts 423.Pa /etc/hosts
421first, and then the DNS resolver specified in 424first, and then the DNS resolver specified in
422.Pa /etc/resolv.conf . 425.Pa /etc/resolv.conf .
423.Pp 426.Pp
424Multicast DNS and DNS Service Discovery are usually not enabled by 427Multicast DNS and DNS Service Discovery are usually not enabled by
425default on a fresh NetBSD system, and can be enabled by setting 428default on a fresh
 429.Nx
 430system, and can be enabled by setting
426.Dq mdnsd=YES 431.Dq mdnsd=YES
427in 432in
428.Pa /etc/rc.conf , 433.Pa /etc/rc.conf ,
429and either rebooting or running the following command: 434and either rebooting or running the following command:
430.Bd -literal -offset indent 435.Bd -literal -offset indent
431.Ic service mdnsd start 436.Ic service mdnsd start
432.Ed 437.Ed
433.Pp 438.Pp
434If your network does not have a usable DNS resolver, e.g. one provided 439If your network does not have a usable DNS resolver, e.g. one provided
435by DHCP, you can run a local caching recursive resolver by setting 440by DHCP, you can run a local caching recursive resolver by setting
436.Dq named=YES 441.Dq named=YES
437in 442in
438.Pa /etc/rc.conf 443.Pa /etc/rc.conf
@@ -600,74 +605,68 @@ Device 512-blocks Used Avail @@ -600,74 +605,68 @@ Device 512-blocks Used Avail
600.Pp 605.Pp
601Edit 606Edit
602.Pa /etc/fstab 607.Pa /etc/fstab
603and use the 608and use the
604.Xr mount 8 609.Xr mount 8
605and 610and
606.Xr umount 8 611.Xr umount 8
607commands as appropriate. 612commands as appropriate.
608Refer to the above example and 613Refer to the above example and
609.Xr fstab 5 614.Xr fstab 5
610for information on the format of this file. 615for information on the format of this file.
611.Pp 616.Pp
612You may wish to do NFS mounts now too, or you can do them later. 617You may wish to do NFS mounts now too, or you can do them later.
613.Ss Concatenated disks (ccd) 
614If you are using 
615.Xr ccd 4 
616concatenated disks, edit 
617.Pa /etc/ccd.conf . 
618You may wish to take a look to 
619.Xr ccdconfig 8 
620for more information about this file. 
621Use the 
622.Ic ccdconfig -U 
623command to unload and the 
624.Ic ccdconfig -C 
625command to create tables internal to the kernel for the concatenated disks. 
626You then 
627.Xr mount 8 , 
628.Xr umount 8 , 
629and edit 
630.Pa /etc/fstab 
631as needed. 
632.Ss Automounter daemon (AMD) 
633To use the 
634.Xr amd 8 
635automounter, create the 
636.Pa /etc/amd 
637directory, copy example config files from 
638.Pa /usr/share/examples/amd 
639to 
640.Pa /etc/amd 
641and customize them as needed. 
642Alternatively, you can get your maps with YP. 
643.Ss Clock synchronization 618.Ss Clock synchronization
644In order to make sure the system clock is synchronized 619In order to make sure the system clock is synchronized
645to that of a publicly accessible NTP server, 620to that of a publicly accessible NTP server,
646make sure that 621make sure that
647.Pa /etc/rc.conf 622.Pa /etc/rc.conf
648contains the following: 623contains the following:
649.Pp 624.Pp
650.Dl ntpdate=YES 625.Dl ntpdate=YES
651.Dl ntpd=YES 626.Dl ntpd=YES
652.Pp 627.Pp
653See 628See
654.Xr date 1 , 629.Xr date 1 ,
655.Xr ntpdate 8 , 630.Xr ntpdate 8 ,
656.Xr ntpd 8 , 631.Xr ntpd 8 ,
657.Xr rdate 8 , 632.Xr rdate 8 ,
658and 633and
659.Xr timed 8 634.Xr timed 8
660for more information on setting the system's date. 635for more information on setting the system's date.
 636.Ss Insalling packages
 637The
 638.Nx
 639packages collection, pkgsrc, includes a large set of third-party software.
 640A lot of it is available as binary packages that you can download from
 641.Lk https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/
 642or a mirror.
 643.Pp
 644For most users, using pkgin to manage binary packages is recommended.
 645.Pp
 646To install pkgin, if it was not done by the installer:
 647.Bd -literal -offset indent
 648.Ic PKG_PATH=https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/[...]
 649.Ic export PKG_PATH
 650.Ic pkg_add pkgin
 651.Ic pkgin update
 652.Ic pkgin install bash mpg123 fluxbox ...
 653.Ed
 654.Pp
 655See
 656.Lk https://www.pkgsrc.org/
 657and
 658.Pa pkgsrc/doc/pkgsrc.txt
 659for more details.
661.Sh CHANGING /etc FILES 660.Sh CHANGING /etc FILES
662The system should be usable now, but you may wish to do more customizing, 661The system should be usable now, but you may wish to do more customizing,
663such as adding users, etc. 662such as adding users, etc.
664Many of the following sections may be skipped 663Many of the following sections may be skipped
665if you are not using that package (for example, skip the 664if you are not using that package (for example, skip the
666.Sx Kerberos 665.Sx Kerberos
667section if you won't be using Kerberos). 666section if you won't be using Kerberos).
668We suggest that you 667We suggest that you
669.Ic cd /etc 668.Ic cd /etc
670and edit most of the files in that directory. 669and edit most of the files in that directory.
671.Pp 670.Pp
672Note that the 671Note that the
673.Pa /etc/motd 672.Pa /etc/motd
@@ -737,26 +736,56 @@ corresponding entries can be made in @@ -737,26 +736,56 @@ corresponding entries can be made in
737You can take a look at 736You can take a look at
738.Pa /etc/defaults/rc.conf 737.Pa /etc/defaults/rc.conf
739to see a list of default system variables, which you can override in 738to see a list of default system variables, which you can override in
740.Pa /etc/rc.conf . 739.Pa /etc/rc.conf .
741Note you are 740Note you are
742.Em not 741.Em not
743supposed to change 742supposed to change
744.Pa /etc/defaults/rc.conf 743.Pa /etc/defaults/rc.conf
745directly, edit only 744directly, edit only
746.Pa /etc/rc.conf . 745.Pa /etc/rc.conf .
747See 746See
748.Xr rc.conf 5 747.Xr rc.conf 5
749for further information. 748for further information.
 749.Ss Automounter daemon (AMD)
 750To use the
 751.Xr amd 8
 752automounter, create the
 753.Pa /etc/amd
 754directory, copy example config files from
 755.Pa /usr/share/examples/amd
 756to
 757.Pa /etc/amd
 758and customize them as needed.
 759Alternatively, you can get your maps with YP.
 760.Ss Concatenated disks (ccd)
 761If you are using
 762.Xr ccd 4
 763concatenated disks, edit
 764.Pa /etc/ccd.conf .
 765You may wish to take a look to
 766.Xr ccdconfig 8
 767for more information about this file.
 768Use the
 769.Ic ccdconfig -U
 770command to unload and the
 771.Ic ccdconfig -C
 772command to create tables internal to the kernel for the concatenated disks.
 773You then
 774.Xr mount 8 ,
 775.Xr umount 8 ,
 776and edit
 777.Pa /etc/fstab
 778as needed.
750.Ss X Display Manager 779.Ss X Display Manager
751If you've installed X, you may want to turn on 780If you've installed X, you may want to turn on
752.Xr xdm 1 , 781.Xr xdm 1 ,
753the X Display Manager. 782the X Display Manager.
754To do this, set 783To do this, set
755.Dq xdm=YES 784.Dq xdm=YES
756in 785in
757.Pa /etc/rc.conf . 786.Pa /etc/rc.conf .
758.Ss Printers 787.Ss Printers
759Edit 788Edit
760.Pa /etc/printcap 789.Pa /etc/printcap
761and 790and
762.Pa /etc/hosts.lpd 791.Pa /etc/hosts.lpd
@@ -923,84 +952,45 @@ etc/daily: @@ -923,84 +952,45 @@ etc/daily:
923The best bet is to follow the advice in that list. 952The best bet is to follow the advice in that list.
924The recommended setting is the first item in parentheses, while 953The recommended setting is the first item in parentheses, while
925the current setting is the second one. 954the current setting is the second one.
926This list is generated by 955This list is generated by
927.Xr mtree 8 956.Xr mtree 8
928using 957using
929.Pa /etc/mtree/special . 958.Pa /etc/mtree/special .
930Use 959Use
931.Xr chmod 1 , 960.Xr chmod 1 ,
932.Xr chgrp 1 , 961.Xr chgrp 1 ,
933and 962and
934.Xr chown 8 963.Xr chown 8
935as needed. 964as needed.
936.Ss Packages 965.Sh SYSTEM TESTING
937Install your own packages. 966At this point, the system should be fully configured to your liking.
938The 967It is now a good time to ensure that the system behaves according to
939.Nx 968its specifications and that it is stable on your hardware.
940packages collection, pkgsrc, includes a large set of third-party software. 969Please refer to
941A lot of it is available as binary packages that you can download from 970.Xr tests 7
942.Lk https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/ 971for details on how to do so.
943or a mirror. 
944.Pp 
945For most users, using pkgin to manage binary packages is recommended. 
946.Pp 
947To install pkgin, if it was not done by the installer: 
948.Bd -literal -offset indent 
949.Ic PKG_PATH=https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/[...] 
950.Ic export PKG_PATH 
951.Ic pkg_add pkgin 
952.Ic pkgin update 
953.Ic pkgin install bash mpg123 fluxbox ... 
954.Ed 
955.Pp 
956See 
957.Lk https://www.pkgsrc.org/ 
958and 
959.Pa pkgsrc/doc/pkgsrc.txt 
960for more details. 
961.Pp 
962Copy vendor binaries and install them. 
963You will need to install any shared libraries, etc. 
964(Hint: 
965.Ic man -k compat 
966to find out how to install and use compatibility mode.) 
967.Pp 972.Pp
968There is also other third-party software that is available 
969in source form only, either because it has not been ported to 
970.Nx 
971yet, because licensing restrictions make binary redistribution 
972impossible, or simply because you want to build your own binaries. 
973Sometimes checking the mailing lists for 
974past problems that people have encountered will result in a fix posted. 
975.Ss Check the running system 
976You can use 973You can use
977.Xr ps 1 , 974.Xr ps 1 ,
978.Xr netstat 1 , 975.Xr netstat 1 ,
979and 976and
980.Xr fstat 1 977.Xr fstat 1
981to check on running processes, network connections, and opened files, 978to check on running processes, network connections, and opened files,
982respectively. 979respectively.
983Other tools you may find useful are 980Other tools you may find useful are
984.Xr systat 1 981.Xr systat 1
985and 982and
986.Xr top 1 . 983.Xr top 1 .
987.Sh SYSTEM TESTING 
988At this point, the system should be fully configured to your liking. 
989It is now a good time to ensure that the system behaves according to 
990its specifications and that it is stable on your hardware. 
991Please refer to 
992.Xr tests 7 
993for details on how to do so. 
994.Sh SEE ALSO 984.Sh SEE ALSO
995.Xr chgrp 1 , 985.Xr chgrp 1 ,
996.Xr chmod 1 , 986.Xr chmod 1 ,
997.Xr config 1 , 987.Xr config 1 ,
998.Xr crontab 1 , 988.Xr crontab 1 ,
999.Xr date 1 , 989.Xr date 1 ,
1000.Xr df 1 , 990.Xr df 1 ,
1001.Xr domainname 1 , 991.Xr domainname 1 ,
1002.Xr fstat 1 , 992.Xr fstat 1 ,
1003.Xr hostname 1 , 993.Xr hostname 1 ,
1004.Xr make 1 , 994.Xr make 1 ,
1005.Xr man 1 , 995.Xr man 1 ,
1006.Xr netstat 1 , 996.Xr netstat 1 ,