620 likes | 796 Views
Chapter Twelve. Common Administrative Tasks. Objectives. Set up, manage, and print to printers on a Linux system Understand the purpose of log files and how they are administered
E N D
Chapter Twelve Common Administrative Tasks
Objectives • Set up, manage, and print to printers on a Linux system • Understand the purpose of log files and how they are administered • Create, modify, manage, and delete user and group accounts using command-line utilities and the Red Hat User Manager
Printer Administration:The Print Process • A set of information that is sent to a printer at the same time is called a print job • To send a print job to a printer, you must first use the lpr command and specify what to print • Next, the line printer daemon (lpd) assigns the print job a unique print job ID and places a copy of the print job into a temporary directory on the filesystem called the print queue, provided the printer is enabled • If the printer is disabled, then the lpd prints an error message stating the printer is not accepting print jobs
Printer Administration:The Print Process • Accepting print jobs is commonly called spooling • If the printer is started, the lpd sends the print job from the print queue to the printer • Conversely, if the printer is stopped, the print job remains in the print queue • Sending jobs from a print queue to a printer is commonly called printing
Printer Administration:The Print Process Figure 12-1: The print process
Printer Administration:The Print Process • lpc command • Used to view the status of and control printers on the system Table 12-1: Common keywords used in the lpc command
Printer Administration:Managing Print Jobs Table 12-2: Common options to the lpr command
Printer Administration:Managing Print Jobs • Postscript • Non-text file format that is commonly used in documents • enscript command • Command used to print Postscript formatted files • a2ps command • Other command also used to print Postscript formatted files
Printer Administration:Managing Print Jobs • lpq command • Command used to view the contents of print queries • lprm command • Command used to remove print jobs from the print queue
Printer Administration:Managing Print Jobs Table 12-3: Common options to the lpq command
Printer Administration:Configuring Printers • /etc/printcap • File that holds the configuration information for each printer installed on the system • Red Hat Printer Configuration Tool • Graphical utility used to configure printers on the system
Printer Administration:Configuring Printers Figure 12-2: The Red Hat Printer Configuration Tool
Printer Administration:Configuring Printers Figure 12-3: Creating a new printer
Printer Administration:Configuring Printers Figure 12-4: Specifying the name and type of a printer
Printer Administration:Configuring Printers Figure 12-5: Configuring a local printer
Printer Administration:Configuring Printers Figure 12-6: Configuring a UNIX printer
Printer Administration:Configuring Printers • User account • Information regarding a user that is stored in a system database Figure 12-7: Configuring a Windows printer
Printer Administration:Configuring Printers Figure 12-8: Configuring a Novell printer
Printer Administration:Configuring Printers Figure 12-9: Configuring a JetDirect printer
Printer Administration:Configuring Printers 12-10: Selecting a printer driver
Printer Administration:Configuring Printers 12-11: Completing printer creation
Printer Administration:Configuring Printers Figure 12-12: Viewing printer in the Red Hat Printer Configuration Tool
Printer Administration:Configuring Printers Figure 12-13: Creating a printer alias
Printer Administration:Configuring Printers Figure 12-14: Editing the device used for a local printer
Printer Administration:Configuring Printers Figure 12-15: Editing the print driver
Printer Administration:Configuring Printers Figure 12-16: Editing printer options
Printer Administration:Configuring Printers Figure 12-17: Saving changes and restarting lpd
Printer Administration:Configuring Printers Figure 12-18: Printing a test page
Printer Administration:Configuring Printers Figure 12-19: The Red Hat Printer Configuration Tool (terminal interface)
Printer Administration:Configuring Printers • Although the Red Hat Printer Configuration Tool is the easiest method for creating printers, you may also add printers by editing the /etc/printcap.local file • /etc/printcap.local • A file that holds printer configuration information for each printer installed on the system
Printer Administration:Configuring Printers Table 12-4: Common keywords used in the /etc/printcap file
Log File Administration • Log files • Files containing information about the Linux system • /var/log • A directory that contains most log files on a Linux system
Log File Administration Table 12-5: Common Linux log files found in /var/log
Log File Administration Table 12-5 (continued): Common Linux log files found in /var/log
The System Log Daemon • System log daemon (syslogd) • Logs system events to various log files via information stored in /etc/syslog.conf • Facility • When logging events, refers to the area of the system from which information is gathered • Priority • Importance of system information when logging system events
The System Log Daemon Table 12-6: Facilities used by the system log daemon
The System Log Daemon Table 12-7: Priorities used by the log daemon
Managing Log Files • Do not remove log files, as the permissions and ownership will be removed as well • /etc/logrotate.conf • File used by the logrotate utility to specify rotation parameters for log files • logrotate command • Used to rotate log files
Administering Users and Groups • Authentication • Act of verifying a user’s identity by comparing a username and password to a system database • The system database that contains user account information typically consists of two files: • /etc/passwd • /etc/shadow
Administering Users and Groups • To convert the system so it will use an /etc/shadow file to store the encrypted password after installation, you may run the pwconv command • Alternatively, the pwunconv command may be used to revert back to using an /etc/passwd file only • User Identifier (UID) • Specifies the unique user ID assigned to each user • Group Identifier (GID) • Primary group ID for each user
Administering Users and Groups • Primary group • Specified for a user in the /etc/passwd file • Specified as group owner for all files created by a user • General Electric Comprehensive Operating System (GECOS) • The field in the /etc/passwd file that contains a description of the user account
Creating User Accounts • useradd command • Used to add a user account to the system • /etc/login.defs • File that contains default values for user creation
Creating User Accounts • /etc/default useradd • File that contains default values for user creation • Skeleton directory • Directory that contains files that are copied to all new users’ home directories upon creation
Creating User Accounts Table 12-8: Common options to the useradd command
Modifying User Accounts Table 12-9: Common options to the usermod command
Modifying User Accounts • chage command • Used to modify password expiry information for user accounts • Locking an account • Making an account temporarily unusable by altering the password information for it stored on the system • chsh command • Used to change a valid shell to an invalid shell
Deleting User Accounts • userdel command • Used to remove a user account from the system • When a user account is deleted, any files that were previously owned by the user become owned by a number that represents the UID of the deleted user
Managing Groups • groupadd command • Used to add a group to the system • groupmod command • Used to modify the name of GID of a group on the system • groupdel command • Used to add a group to the system
Using the Red Hat User Manager Figure 12-20: The Red Hat User Manager
Using the Red Hat User Manager Figure 12-21: Viewing groups in the Red Hat User Manager