Certification Objective 6.02-The Basic User Environment


Each user on any Red Hat Enterprise Linux system has an environment when logged on to the system. The environment defines directories where Linux looks for programs to run, the look of the login prompt, the terminal type, and more. This section explains how you can configure the default environment for your users.

Home Directories and /etc/skel

By default, when you create a new user, a default set of configuration files is created in the user's home directory. These defaults are hidden files stored in the /etc/skel directory.

Home Directory

The home directory is where a user starts when he first logs on to a RHEL system. The home directory for most users is /home/username, where username is the user's login name. Every user should normally have write permission in his own home directory, so each user is free to read and write his own files. Later in this chapter, you'll learn how to configure disk quotas, so users don't take more than their fair share of disk space.

/etc/skel

The /etc/skel directory contains default environment files for new accounts. The useradd command and the Red Hat User Manager copy these files to the home directory when you create a new account. The contents of /etc/skel may vary depending on what you have installed. Standard files from my copy of /etc/skel are described in Table 6-5.

Table 6-5: Default Home Directory Files from /etc/skel

File

Purpose

.bashrc

This basic bash configuration file may include a reference to the general /etc/bashrc configuration file. Can include commands you want to run when you start the bash shell, appropriate for aliases such as rm='rm -i'.

.bash_logout

This file is executed when you exit a bash shell and can include commands appropriate for this purpose, such as commands for clearing your screen.

.bash_profile

Configures the bash startup environment. Appropriate place to add environment variables or modify the directories in your PATH.

.gtkrc

Adds the Bluecurve theme for the default Red Hat GUI.

.kde

This directory includes autostart settings for the K Desktop Environment. Not added to /etc/ skel and not copied to user home directories if you haven't installed KDE on this computer.

If you've installed more than the default software on RHEL, you may see additional configuration files in the /etc/skel directory. For example, if you've installed the appropriate RPMs, you may see configuration files associated with emacs and the z shell (zsh) in this directory.

On the Job 

Linux includes many hidden files that start with a dot (.). To list these files, run the ls -a command. For example, if you want to list all of the files in the /etc/skel directory, run the ls -a /etc/skel command.

As the system administrator, you can edit these files or place your own customized files in /etc/skel. When new users are created, these files are propagated to the new users' home directories.

On the Job 

Adding files to /etc/skel may be a convenient way to distribute files such as corporate policies to new users.

Window Manager Configuration Files

RHEL comes with several window managers. At some point you will want to configure one or more of them for use on your system. In the past, window manager configuration files were stored in the /etc/X11/windowmanager directory, where windowmanager is the name of the specific window manager. This directory still includes twm (Tom's Window Manager). The X Display Manager is no longer available for RHEL 5. The GNOME and KDE Display Managers are stored in their own directories, /etc/gdm and /usr/share/ config/kdm.



RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302)
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2004
Pages: 227
Authors: Michael Jang

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net