Changeset cfc2a54
- Timestamp:
- 08/22/2003 03:37:27 PM (20 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/python-mods, qt5new, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, v5_0, v5_0-pre1, v5_1, v5_1-pre1, xry111/intltool, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 0108c1d
- Parents:
- 71f73f0f
- Location:
- postlfs/config
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
postlfs/config/bootdisk.xml
r71f73f0f rcfc2a54 5 5 <para>How to create a decent bootdisk</para> 6 6 <para>The intent here is to create a "rescue bootdisk" that will load 7 enough 'linux' to enable you to do rescue operations. W ith what is presented here8 you will be ableto do file manipulation, mounting and unmounting, and other tasks.9 This howeveris not the limit. The minimal disk is described here, and you can7 enough 'linux' to enable you to do rescue operations. What is presented here 8 is enough to do file manipulation, mounting and unmounting, and other tasks. 9 This, however, is not the limit. The minimal disk is described here, and you can 10 10 add anything you can fit on the floppy.</para> 11 11 <para> 12 Boot disk/Rescue Disk12 Boot Disk/Rescue Disk 13 13 </para> 14 14 <para> 15 First we will create a loopback file to build our rescue disk image on, next 16 we'll make a file system on the image file, then we'll use 'mount' to mount 17 the file as a regular disk, allowing us to read and write files from the loopback file. 15 First we will create a loopback file on which we build the root file 16 system for our rescue disk image. This is commonly known as the initial 17 ramdisk, or initrd for short, and it is automatically loaded by the boot 18 process if all setup is done correctly.</para> 19 <para> 20 Next we'll make a file system on the loopback file and use 'mount' to mount 21 the loopback file as a regular disk, allowing us to read and write files there. 18 22 The following commands will build us a 4 MB image. 19 23 </para> … … 33 37 anyway. If you used MAKEDEV to create your devices, you'll want to 34 38 trim the <filename>/mnt/loop1/dev</filename> directory to reclaim the inode space wasted 35 by all of the devices in the <filename>dev</filename> directory you don't use.</para>39 by the devices you don't use in the <filename>dev</filename> directory.</para> 36 40 <para><screen><userinput>cp -dpR /dev/* /mnt/loop1/dev</userinput></screen></para> 37 41 <para>Now to tend to the <filename>/etc</filename> directory. To start, all we will do is use -
postlfs/config/config.xml
r71f73f0f rcfc2a54 4 4 5 5 <para>The intention of LFS is to provide a basic system which you can 6 build upon. There are several things which many people wonder about to7 do with tidying up their systemonce they have done the base install.6 build upon. There are several things, about tidying up the system, 7 which many people wonder about once they have done the base install. 8 8 We hope to cover these issues in this chapter.</para> 9 9 … … 13 13 these files can be found in the <filename>/etc</filename> hierarchy. 14 14 There are often graphical configuration programs available for different 15 subsystems but these are mostlysimply pretty frontends to the process15 subsystems but most are simply pretty frontends to the process 16 16 of editing the file. The advantage of text-only configuration is that 17 17 you can edit parameters using your favorite text editor, whether that 18 18 be vim, emacs or anything else.</para> 19 19 20 <para>The first task is making a recovery diskette because it's the most 21 critical need. Then the system is configured to ease addition of 22 new users, in "Configuring for Adding Users", because this 23 can affect the choices you make in the three subsequent topics - 24 "/etc/inputrc", "The Bash Shell Startup Files" and 25 "/etc/vimrc, ~/.vimrc". 26 </para> 27 28 <para> The remaining topics, "/etc/issue (Customizing your logon)", 29 "Random number generation", "Man page issues" and "Info page issues" are 30 then addressed, in that order. They don't have much interaction with the 31 other topics in this chapter. 32 </para> 33 34 &postlfs-config-bootdisk; 35 &postlfs-config-skel; 36 &postlfs-config-inputrc; 37 &postlfs-config-profile; 38 &postlfs-config-vimrc; 20 39 &postlfs-config-logon; 21 &postlfs-config-profile;22 &postlfs-config-inputrc;23 40 &postlfs-config-random; 24 &postlfs-config-vimrc;25 &postlfs-config-bootdisk;26 41 &postlfs-config-manpages; 27 42 &postlfs-config-infopages; 28 &postlfs-config-skel;29 43 30 44 </chapter> -
postlfs/config/inputrc.xml
r71f73f0f rcfc2a54 3 3 <title>/etc/inputrc</title> 4 4 5 <para><filename> inputrc</filename> deals with the mapping of the keyboard for5 <para><filename>Inputrc</filename> deals with the mapping of the keyboard for 6 6 certain situations. This file is the start-up file used by 7 7 <application>readline</application> - the input related library used by … … 13 13 one rc file.</para> 14 14 15 <para>The following is a base <filename>/etc/inputrc</filename> along with 16 comments to explain what the various options do.</para> 15 <para>Global values are set in <filename>/etc/inputrc</filename>. 16 Personal user values are set in <filename>~/.inputrc</filename>. The 17 <filename>~/.inputrc</filename> file will override the global settings 18 file. A later page sets up <application>Bash</application> to use 19 <filename>/etc/inputrc</filename> if there is no 20 <filename>.inputrc</filename> for a user when 21 <filename>/etc/profile</filename> is read (usually at login). If you 22 want your system to use both, or don't want <emphasis>global</emphasis> 23 keyboard handling, it is a good idea to place a default 24 <filename>.inputrc</filename> into the <filename>/etc/skel</filename> 25 directory for use with new users.</para> 17 26 18 <para>Please note that comments can <emphasis>not</emphasis> be on the 19 same line as commands in <filename>inputrc</filename>.</para> 27 <para> 28 Below is a base <filename>/etc/inputrc</filename> along with 29 comments to explain what the various options do. Note that comments 30 can <emphasis>not</emphasis> be on the same line as commands. 31 </para> 32 33 <para>If you will create an <filename>.inputrc</filename> in 34 <filename>/etc/skel</filename> using the command below, change the 35 command's output to <filename>/etc/skel/.inputrc</filename> and be 36 sure to check/set permissions afterward. Then you can just copy that 37 file to <filename>/etc/inputrc</filename> and the home directory 38 of any user already existing in the system, including root, that needs 39 a private version of the file. Be sure to use the "-p" parameter 40 of "cp" to maintain permissions and be sure to change owner and group 41 appropriately. 42 </para> 20 43 21 44 <screen><userinput><command>cat > /etc/inputrc << "EOF"</command> … … 60 83 <command>EOF</command></userinput></screen> 61 84 62 <para>Global values are set in <filename>/etc/inputrc</filename>.63 Personal user values as are set in <filename>~/.inputrc</filename>. The64 <filename>~/.inputrc</filename> file will override the global settings65 file. The previous page sets up <application>Bash</application> to use66 <filename>/etc/inputrc</filename> by default. If you want your system67 to use both, it might be a good idea to place a default68 <filename>.inputrc</filename> into the <filename>/etc/skel</filename>69 directory for use with new users.</para>70 71 85 </sect1> -
postlfs/config/logon.xml
r71f73f0f rcfc2a54 16 16 <command>ssh</command> however, will only use it if you set the option in the 17 17 configuration file and will also <emphasis>not</emphasis> interpret the 18 escape sequences asshown below.</para>18 escape sequences shown below.</para> 19 19 20 20 <para>One of the most common things which people want to do is to clear 21 21 the screen at each logon. The easiest way of doing that is to put a 22 "clear" escape into <filename>/etc/issue</filename>. A simple way of doing22 "clear" escape-sequence into <filename>/etc/issue</filename>. A simple way of doing 23 23 this is to do <userinput><command>clear > /etc/issue</command></userinput>. 24 24 This will insert the relevant escape code into the start of the -
postlfs/config/profile.xml
r71f73f0f rcfc2a54 6 6 referred to as just "the shell") uses a collection of startup files to 7 7 help create an environment to run in. Each file has a specific use and 8 may affect login and interactive environments differently.</para> 9 10 <para>An interactive login shell is started after a successful login by 11 <filename>/bin/login</filename> by reading the 8 may affect login and interactive environments differently. The files in 9 the <filename>/etc</filename> directory generally provide global 10 settings. If an equivalent file exists in your home directory it may 11 override the global settings. 12 </para> 13 14 <para>An interactive login shell is started after a successful login, using 15 <filename>/bin/login</filename>, by reading the 12 16 <filename>/etc/passwd</filename> file. An 13 17 interactive non-login shell is started at the command line (e.g. … … 21 25 Shells.</emphasis></para> 22 26 23 <para>The following files are needed to make sure that the correct24 environment is read for each of the ways the shell can be invoked:25 <filename>/etc/profile</filename> , <filename>/etc/bashrc</filename>,27 <para>The following files are used to make sure that the correct 28 environment is established for each of the ways the shell can be invoked: 29 <filename>/etc/profile</filename> and its private equivalent 26 30 <filename>~/.bash_profile</filename>, and 27 <filename>~/.bashrc</filename>. The file 28 <filename>~/.bash_logout</filename> is not used for an invocation of the 29 shell. It is read by the shell when a user logouts of the system. The 30 files <filename>/etc/profile</filename> and 31 <filename>/etc/bashrc</filename> (unofficial) and its private equivalent 32 <filename>~/.bashrc</filename>. 33 </para> 34 35 <para> 36 The file <filename>~/.bash_logout</filename> is not used for an 37 invocation of the shell. It is read by the shell when a user logs out 38 of the system.</para> 39 40 <para>The files <filename>/etc/profile</filename> and 31 41 <filename>~/.bash_profile</filename> are read when the shell is invoked 32 as a interactive login shell. The file <filename>~/.bashrc</filename>42 as an interactive login shell. The file <filename>~/.bashrc</filename> 33 43 is read when the shell is invoked as an interactive non-login 34 shell.</para> 44 shell and it reads <filename>/etc/bashrc</filename> if it exists</para> 45 46 <para>Also useful are the <filename>/etc/dircolors</filename> and 47 <filename>~/.dircolors</filename> files called from 48 <filename>/etc/profile</filename>. They control colorized output of 49 things like <emphasis>ls --color</emphasis>. 50 </para> 35 51 36 52 <para>Here is a base <filename>/etc/profile</filename>. Comments in the … … 141 157 142 158 <para>Here is a base <filename>~/.bash_profile</filename>. Comments in 143 the file should explain everything you need.</para> 159 the file should explain everything you need. If you want each new user 160 to have this file automatically provided, just change the output of the 161 next command to <filename>/etc/skel/.bash_profile</filename> and check the 162 permissions after the command is run. You can then copy 163 <filename>/etc/skel/.bash_profile</filename> to the home directories of 164 already existing users, including root, and set the owner and group 165 appropriately. 166 </para> 144 167 145 168 <screen><userinput><command>cat > ~/.bash_profile << "EOF"</command> … … 168 191 169 192 <para>Here is a base <filename>~/.bashrc</filename>. Comments in the 170 file should explain everything you need.</para> 193 file should explain everything you need. The comments and 194 instructions for using <filename>/etc/skel</filename> for 195 <filename>.bash_profile</filename> above also apply here. Only the 196 target file names are different.</para> 171 197 172 198 <screen><userinput><command>cat > ~/.bashrc << "EOF"</command> … … 205 231 <command>EOF</command></userinput></screen> 206 232 207 <para>If you want to use the <filename>/etc/dircolors</filename> or 208 <filename>~/.dircolors</filename> files called from 209 <filename>/etc/profile</filename>, then run the following: 210 <userinput>/bin/dircolors -p > /etc/dircolors</userinput> or 211 <userinput>/bin/dircolors -p > ~/.dircolors</userinput> respectively. 212 The file in the <filename>/etc</filename> directory should be used for 213 global settings and if one exists in your home directory then it will 214 overwrite the global settings. It might be a good idea to create a base 215 <filename>.dircolors</filename> file and place it in the 216 <filename>/etc/skel</filename> directory for new users.</para> 233 <para> 234 If you want to use the <filename>dircolors</filename> capability 235 then run the following command. The <filename>/etc/skel</filename> setup 236 steps seen above also can be used here to provide a 237 <filename>.dircolors</filename> file when a new user is set up. As 238 before, just change the output file name on the following command and 239 assure the permissions, owner and group are correct on the files created 240 and/or copied. 241 </para> 242 243 <para> 244 <userinput><command>/bin/dircolors -p > /etc/dircolors</command></userinput> 245 </para> 217 246 218 247 <para>Ian Macdonald has written an excellent collection of tips and -
postlfs/config/skel.xml
r71f73f0f rcfc2a54 1 1 <sect1 id="postlfs-config-skel"> 2 2 <?dbhtml filename="skel.html" dir="postlfs"?> 3 <title> /etc/skel</title>3 <title>Configuring for Adding Users</title> 4 4 5 <para>The <filename>/etc/skel</filename> directory is quite simple 6 to setup and use. It provides a way to make sure that all new users on 7 your LFS system begin with the same settings. The 8 <filename>/etc/skel</filename> directory is used by the 9 <filename>/usr/sbin/useradd</filename> program.</para> 5 <para>Together, the <filename>/usr/sbin/useradd</filename> command and 6 <filename>/etc/skel</filename> directory (both are easy to setup and use) 7 provide a way to assure new users are added on your LFS system with the 8 same beginning settings for things like $PATH, keyboard processing and 9 environmental variables. Using these two facilities makes it easier to 10 assure this initial state for each new user. 11 </para> 10 12 11 <para>For more information see <userinput>man useradd</userinput>.</para> 13 <para> 14 The <filename>/etc/skel</filename> directory holds copies of various 15 initialization and other files that may be copied to the new user's home 16 directory when the <filename>/usr/sbin/useradd</filename> 17 program adds the new user.</para> 12 18 13 <para>To get started create a <filename>/etc/skel</filename> directory. 14 Creating the directory as root is the best way to go. Next copy any 15 files into <filename>/etc/skel</filename> that you want every new user 16 to have placed in their home drive. Examples include 17 <filename>.bash_profile</filename>, <filename>.bashrc</filename>, 18 <filename>.bash_logout</filename>, <filename>dircolors</filename>, 19 <filename>.inputrc</filename> and <filename>.vimrc</filename>.</para> 19 <para>Useradd</para> 20 20 21 <para>When creating a new user with 22 <filename>/usr/sbin/useradd</filename> use the <userinput>-m</userinput> 23 parameter. For example:</para> 24 25 <para><screen><userinput>useradd -m -s/bin/bash jwrober</userinput></screen></para> 26 27 <para>The <filename>/usr/sbin/useradd</filename> program uses a 28 collection of default values. It will read them from the 29 <filename>/etc/default/useradd</filename> file if it exists. If the 30 file does not exist, then it uses some internal defaults. They can be 31 found by running <userinput>/usr/sbin/useradd -D</userinput>.</para> 21 <para>The <filename>useradd</filename> program uses a collection of 22 default values kept in <filename>/etc/default/useradd</filename>, 23 if it exists. If the file does not exist, then it uses some internal 24 defaults. You can see the default values by running 25 <userinput>/usr/sbin/useradd -D</userinput>. 26 </para> 32 27 33 28 <para>To change these values to something new, create a base … … 53 48 54 49 <para>This will set the <userinput>SHELL=</userinput> line to 55 <userinput>SHELL=/bin/bash</userinput>. This makes it even easier to 56 add new users to your LFS system. The 57 <filename>/usr/sbin/useradd</filename> has many parameters that can be 58 set in the <filename>/etc/default/useradd</filename> file. See the man 59 page for more details.</para> 50 <userinput>SHELL=/bin/bash</userinput>.</para> 51 52 <para><filename>Useradd</filename> has many parameters that 53 can be set in the <filename>/etc/default/useradd</filename> file. 54 </para> 55 56 <para>For more information see <userinput>man useradd</userinput>.</para> 57 58 <para>/etc/skel</para> 59 60 <para>To get started create an <filename>/etc/skel</filename> directory 61 and make sure it is writable only by the system administrator, usually 62 root. Creating the directory as root is the best way to go.</para> 63 64 <para>The mode of any files from this part of the book that you put in 65 <filename>/etc/skel</filename> should be writable only by the owner. 66 Also, since there is no telling what kind of sensitive information a 67 user may eventually place in their copy of these files, you should 68 make them unreadable by "group" and "other".</para> 69 70 <para>You can also put other files in <filename>/etc/skel</filename> and 71 different permissions may be needed for them. 72 </para> 73 74 <para> 75 Decide which initialization files should be provided in every (or most) 76 new user's home directory. The decisions you make will affect what you 77 do in the next three sections, "/etc/inputrc", "The Bash Shell Startup 78 Files" and "/etc/vimrc, ~/.vimrc". Some or all of those files will be 79 useful for root, any already-existing users, and new users.</para> 80 81 <para>The files from those sections that you might want to place in 82 <filename>/etc/skel</filename> include 83 <filename>.inputrc</filename>, <filename>.bash_profile</filename>, 84 <filename>.bashrc</filename>, <filename>.bash_logout</filename>, 85 <filename>.dircolors</filename>, and <filename>.vimrc</filename>. If 86 you are unsure which of these should be placed there, just continue to 87 the following sections, read each section and any references provided, 88 and then make your decision.</para> 89 90 <para>You will run a slightly modified set of commands for files which 91 are placed in <filename>/etc/skel</filename>. Each section will remind 92 you of this. In brief, the book's commands have been written for files 93 <emphasis>not</emphasis> added to <filename>/etc/skel</filename> and 94 just send the results to the user's home directory. If the file is going 95 to be in <filename>/etc/skel</filename>, change the book's command(s) to 96 send output there instead and then just copy the file from 97 <filename>/etc/skel</filename> to the appropriate directories, like 98 <filename>/etc</filename>, <filename>~</filename> or the home directoriy 99 of any other user already in the system.</para> 100 101 <para>When Adding a User</para> 102 103 <para>When adding a new user with <filename>useradd</filename> use 104 the <userinput>-m</userinput> parameter, which tells 105 <filename>useradd</filename> to create the user's home directory and 106 copy files from <filename>/etc/skel</filename> (can be overridden) to 107 the new user's home directory. For example:</para> 108 109 <para><screen><userinput>useradd -m -s/bin/bash jwrober</userinput></screen></para> 60 110 61 111 </sect1> -
postlfs/config/vimrc.xml
r71f73f0f rcfc2a54 17 17 the global vimrc was <filename>/usr/share/vim/vimrc</filename>.</para> 18 18 19 <para>Here is an example of a slightly expanded vimrc:</para> 19 <para>Here is a slightly expanded vimrc that you can put in 20 <filename>/etc/vimrc</filename> to provide global effect. Of course, if 21 you put it into <filename>/etc/skel/.vimrc</filename> instead, it will 22 be made available to users you add to the system later. You can also copy 23 the file from <filename>/etc/skel/.vimrc</filename> to 24 <filename>/etc/vimrc</filename> and the home directory of users already 25 on the system, like root. Be sure to set permissions, owner and group if 26 you do copy anything directly from <filename>/etc/skel</filename>.</para> 20 27 21 28 <para><screen>" Begin .vimrc
Note:
See TracChangeset
for help on using the changeset viewer.