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