From owner-svn-doc-projects@FreeBSD.ORG Sun May 19 00:01:58 2013 Return-Path: Delivered-To: svn-doc-projects@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9F4D6E8B; Sun, 19 May 2013 00:01:58 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 90F42A62; Sun, 19 May 2013 00:01:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4J01wc6092107; Sun, 19 May 2013 00:01:58 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4J01wQe092105; Sun, 19 May 2013 00:01:58 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <201305190001.r4J01wQe092105@svn.freebsd.org> From: Tom Rhodes Date: Sun, 19 May 2013 00:01:58 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-projects@freebsd.org Subject: svn commit: r41667 - in projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook: basics users X-SVN-Group: doc-projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for doc projects trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2013 00:01:58 -0000 Author: trhodes Date: Sun May 19 00:01:57 2013 New Revision: 41667 URL: http://svnweb.freebsd.org/changeset/doc/41667 Log: Add more information on binary formats in basics. Add a note about sudo in the users chapter. Add a section on using root in the users chapter. Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/users/chapter.xml Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml ============================================================================== --- projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml Sat May 18 23:44:23 2013 (r41666) +++ projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml Sun May 19 00:01:57 2013 (r41667) @@ -302,6 +302,15 @@ console none managing requests for hardware devices, peripherals, memory, and CPU time fairly to each user. + Much more information about User Accounts is in the chapter + about accounts. For now you just + need to know that each person (user) who uses the computer should be + given their own username and password. The system keeps track + of the people using the computer based on this username. Since + it is often the case that several people are working on the same + project Unix also provides groups. Several users can be placed + in the same group. + Because the system is capable of supporting multiple users, everything the system manages has a set of permissions governing who can read, write, and execute the resource. These @@ -2416,8 +2425,23 @@ Swap: 256M Total, 38M Used, 217M Free, 1 Binary Formats - To understand why &os; uses the &man.elf.5; format,the three - currently dominant executable formats for &unix; + Typically when a command is passed to the shell, the shell + will arrange for an executable file to be loaded into memory and + a new process is created. Executable files can either be a binary + file (usually created by the linker as part of compiling a program) + or a shell script (text file to be interpreted by a binary file, + like &man.sh.1; or &man.perl.1;). The &man.file.1; command can + usually determine what is inside a file. + + Binary files need to have a well defined format for the system + to be able to use them properly. Part of the file will be the + executable machine code (the instructions that tell the CPU what + to do), part of it will be data space with pre-defined values, + part will be data space with no pre-defined values, etc. Through + time, different binary file formats have evolved. + + To understand why &os; uses the &man.elf.5; format, the three + currently dominant, executable formats for &unix; must be described: @@ -2545,6 +2569,14 @@ Swap: 256M Total, 38M Used, 217M Free, 1 out of the GENERIC kernel, and eventually removed from the kernel once the need to run legacy a.out programs is past. + + In addition to &man.file.1; another command that can prove + useful when working with executables is &man.ldd.1;. If + &man.file.1; reveals that a file is a dynamically linked + executable &man.ldd.1; can figure out what dynamically linked + libraries that executable file requires. Sometimes programs can + be linked against compatibility libraries instead of the main + system libraries, or otherwise rely on dynamic libraries. Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/users/chapter.xml ============================================================================== --- projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/users/chapter.xml Sat May 18 23:44:23 2013 (r41666) +++ projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/users/chapter.xml Sun May 19 00:01:57 2013 (r41667) @@ -1034,4 +1034,49 @@ uid=1001(jru) gid=1001(jru) groups=1001( /etc/group, refer to &man.pw.8; and &man.group.5;. + + + Becoming Superuser + + There are several ways to do things as the superuser. The + worst way is to log in as root directly. + Usually very little activity requires root + so logging off and logging in as root, + performing tasks, then logging off and on again as a normal user + is a waste of time. + + A better way is to use &man.su.1; without providing a login + but using - to inherit the root environment. + Not providing a login will imply super user. For this to work + the login that must be in the wheel group. + An example of a typical software installation would involve the + administrator unpacking the software as a normal user and then + elevating their privileges for the build and installation of + the software. + + + Install a Program As The Superuser + + &prompt.user; configure +&prompt.user; make +&prompt.user; su - +Password: +&prompt.root; make install +&prompt.root; exit +&prompt.user; + + + Note in this example the transition to + root is less painful than logging off + and back on twice. + + Using &man.su.1; works well for single systems or small + networks with just one system administrator. For more complex + environments (or even for these simple environments) + sudo should be used. It is provided as a port, + security/sudo. It allows for + things like activity logging, granting users the ability to only + run only certain commands as the superuser, and several other + options. +