LINUX - MANAGING DEVICES

 

Configuring a Virtual (PDF) Printer

Scenario

HR wants to distribute the acceptable use policy (AUP) to employees at Develetech in both hardcopy and electronic form. Right now, you don't have an actual printer connected to your Linux system, but you can still print the AUP text file to a PDF, which is more suitable than a raw text file for distribution purposes. Before you can create the PDF, you'll need to set up a virtual printer.

Objectives

Completing this activity will help you to use content examples from the following syllabus objectives:

  • 2.7 Explain the use and operation of Linux devices

  • 4.4 Given a scenario, analyze and troubleshoot application and hardware issues


Examine the current list of printers

  1. Log in as student01 with Pa22w0rd as the password.

  2. From the Desktop, select Applications→System Tools→Settings.

  3. From the navigation menu, select Devices.

  4. Select Printers.

  5. Verify that no printers are currently listed.

  6. Keep this window open.

Install the Cups-PDF package

  1. In a terminal, enter sudo yum -y install epel-release cups-pdf

    You may need to issue this command twice in order to successfully download the package.

    You may receive a repeating messages that says an "Existing lock /var/yum/yum.pid: another copy is running." Open a second tab in the terminal (or a second instance of a terminal), and then enter the following command:

    sudo systemctl kill packagekit

Make the Cups-PDF printer your default printer

  1. Return to the Settings window and verify that Cups-PDF is listed in the printers list. If it is not listed, repeat the install command you just entered.

  2. Select Unlock, then enter the root password.

  3. Next to the Cups-PDF printer, select the options gear icon, then select Use Printer by Default.

  4. Close the Settings window.

  1. Open a terminal window and verify that you are in your home directory.

  2. Enter lpr policies/aup_v2.txt

  3. Verify that a printing notification pops up from the desktop.

  4. On the desktop, double-click aup_v2.pdf to open it.

  5. Close the PDF viewer when you're done.

Monitoring Devices

Scenario

As part of your routine system administration tasks, you need to track the devices used on all the computers on the network and maintain a list of hardware resources that are in use.

Objectives

Completing this activity will help you to use content examples from the following syllabus objectives:

  • 2.7 Explain the use and operation of Linux devices

  • 4.4 Given a scenario, analyze and troubleshoot application and hardware issues


Monitor any PCI devices that are connected to the system.

  1. In a terminal window, enter lspci

  2. Examine the brief list of hardware devices that are connected to PCI buses.

    Each line lists the PCI slot a device is connected to, as well as the vendor and product model of the device.

  3. Enter sudo lspci -v to view more information about each device.

  4. Verify that you can see attributes of each device, such as:

    • Its vendor and product model.
    • Its I/O ports.
    • Its various capabilities.
    • The kernel modules and drivers it uses.

    In the virtual lab environment no USB drivers are loaded. In a real, physical environment, you’d also be able to enter the lsusb command to see USB devices on your system.

Monitor a print job.

  1. Enter base64 /dev/urandom | head -c 10000000 > printfile.txt

    There are 7 zeros.

    This will create a text file 10 MB in size using random data encoded in readable text (Base64). This file is large enough to take some time to print, so you'll have a chance to monitor it in the queue.

Enter lpr printfile.txt to start a print job.

  1. Enter lpq and note that you can see the print job in the queue, including information such as:

    • Its rank (status).
    • Who owns the print job.
    • The number of the job.
    • What file(s) are being printed.
    • The total size of the request.
  2. Allow the print job to finish.

Comments

Popular posts from this blog

Install Gophish and Start Your Phishing Campaign

[LINUX] - SECURING LINUX SYSTEMS

Hướng dẫn cách đọc và hiểu thông số firewall - tường lửa