View | Details | Raw Unified | Return to bug 54461
Collapse All | Expand All

(-)basics/chapter.sgml (+31 lines)
Lines 69-74 Link Here
69
      sharing and managing requests for hardware devices, peripherals,
69
      sharing and managing requests for hardware devices, peripherals,
70
      memory, and CPU time evenly to each user.</para>
70
      memory, and CPU time evenly to each user.</para>
71
71
72
    <para>Much more information about User Accounts is in the chapter
73
      about <link linkend="users">accounts</link>.  For now you just
74
      need to know that each person (user) who uses the computer should be
75
      given their own username and password.  The system keeps track
76
      of the people using the computer based on this username.  Since
77
      it is often the case that several people are working on the same
78
      project Unix also provides groups.  Several users can be placed
79
      in the same group.</para>
80
72
    <para>Because the system is capable of supporting multiple users,
81
    <para>Because the system is capable of supporting multiple users,
73
      everything the system manages has a set of permissions governing who
82
      everything the system manages has a set of permissions governing who
74
      can read, write, and execute the resource.  These permissions are
83
      can read, write, and execute the resource.  These permissions are
Lines 1687-1692 Link Here
1687
1696
1688
  <sect1 id="binary-formats">
1697
  <sect1 id="binary-formats">
1689
    <title>Binary Formats</title>
1698
    <title>Binary Formats</title>
1699
    <para>Typically when you type in a command to a shell the shell
1700
      will arrange for an executable file to be loaded into memory and
1701
      a new process results.  Executable files can either be a binary
1702
      file (usually created by the linker as part of compiling a program)
1703
      or a shell script (text file to be interpreted by a binary file,
1704
      like &man.sh.1; or &man.perl.1;).  The &man.file.1; command can
1705
      usually tell you what is inside of a file.</para>
1706
1707
    <para>Binary files need to have a well defined format for the system
1708
      to be able to use them properly.  Part of the file will be the
1709
      executable machine code (the instructions that tell the CPU what
1710
      to do), part of it will be data space with pre-defined values,
1711
      part will be data space with no pre-defined values, etc.  Through
1712
      time different binary file formats have evolved.</para>
1690
1713
1691
    <para>To understand why FreeBSD uses the <filename>ELF</filename>
1714
    <para>To understand why FreeBSD uses the <filename>ELF</filename>
1692
      format, you must first know a little about the 3 currently
1715
      format, you must first know a little about the 3 currently
Lines 1824-1829 Link Here
1824
      <filename>a.out</filename> will be moved out of the GENERIC
1847
      <filename>a.out</filename> will be moved out of the GENERIC
1825
      kernel, and eventually removed from the kernel once the need to
1848
      kernel, and eventually removed from the kernel once the need to
1826
      run legacy <filename>a.out</filename> programs is past.</para>
1849
      run legacy <filename>a.out</filename> programs is past.</para>
1850
1851
    <para>In addition to &man.file.1; another command that can prove
1852
      useful when working with executables is &man.ldd.1;.  If
1853
      &man.file.1; says that a file is a dynamically linked executable
1854
      &man.ldd.1; can tell you what dynamically linked libraries that
1855
      executable file requires.  Sometimes programs can be linked against
1856
      compatibility libraries instead of the main system libraries, or
1857
      otherwise rely on dynamic libraries you were not aware of.</para>
1827
  </sect1>
1858
  </sect1>
1828
1859
1829
  <sect1 id="basics-more-information">
1860
  <sect1 id="basics-more-information">
(-)users/chapter.sgml (-2 / +46 lines)
Lines 248-255 Link Here
248
      for general usage if you have not already.  This applies equally
248
      for general usage if you have not already.  This applies equally
249
      whether you are running a multi-user or single-user machine.
249
      whether you are running a multi-user or single-user machine.
250
      Later in this chapter, we discuss how to create additional
250
      Later in this chapter, we discuss how to create additional
251
      accounts, and how to change between the normal user and
251
      accounts, and how to <link linkend="users-becomesuper">
252
      superuser.</para>
252
        change between the normal user and superuser</link>.</para>
253
  </sect1>
253
  </sect1>
254
    
254
    
255
  <sect1 id="users-system">
255
  <sect1 id="users-system">
Lines 1053-1058 Link Here
1053
      <filename>/etc/group</filename>, consult the &man.group.5; manual
1053
      <filename>/etc/group</filename>, consult the &man.group.5; manual
1054
      page.</para>
1054
      page.</para>
1055
  </sect1>
1055
  </sect1>
1056
1057
  <sect1 id="users-becomesuper">
1058
    <title>Becoming Superuser</title>
1059
1060
    <para>There are several ways to do things as the superuser.  The worst
1061
      way is to log in as <username>root</username>.  Usually very little
1062
      needs to be done as <username>root</username> so logging off as your
1063
      normal username, logging in as <username>root</username>, doing what
1064
      you needed to do, then logging off and back on as your normal username
1065
      is quite a waste of time.</para>
1066
1067
    <para>A better way is to use &man.su.1; without providing a username,
1068
      which implies the <username>root</username> user.  For this to work
1069
      the username that you normally log in as must be in the <groupname>
1070
      wheel</groupname> group.  An example of a fairly typical software
1071
      installation would involve the sys-admin unpacking the software as
1072
      their normal user account.  Then in the unpacked directory, starting
1073
      as their normal user account, doing something like.</para>
1074
1075
    <example>
1076
      <title>Compile and Install a Program</title>
1077
1078
      <screen>&prompt.user; <userinput>configure</userinput>
1079
&prompt.user; <userinput>make</userinput>
1080
&prompt.user; <userinput>su</userinput>
1081
Password:
1082
&prompt.root; <userinput>make install</userinput>
1083
&prompt.root; <userinput>exit</userinput>
1084
&prompt.user;</screen>
1085
    </example>
1086
1087
    <para>Note in this example the transition to <username>root</username>
1088
      was much less painful than logging off and back on twice, and only
1089
      what was absolutely necessary got run as <username>root</username>.</para>
1090
1091
    <para>Using &man.su.1; works well for single systems or small networks
1092
      with just one systems administrator.  For more complex environments
1093
      (or even for these simple environments) you should take a look at
1094
      &man.sudo.8;.  It is provided as the port <filename role="package">
1095
      security/sudo</filename>.  It allows for things like logging what
1096
      gets done, granting users the ability to only run certain things
1097
      as the superuser, etc.</para>
1098
  </sect1>
1099
1056
</chapter>
1100
</chapter>
1057
1101
1058
<!--
1102
<!--

Return to bug 54461