CNE 251: Module 3 Pt. 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Local repository

A local storage location that contains software packages for a Linux distribution.

yumdownloader

A utility that downloads an RPM package from a software repository.

ldd

A utility that shows the shared libraries required by an application.

Which command would you use to display all of the package's dependencies?

depends shows all of the package's dependencies.

You used DNF to list the Ruby packages that are available to install. You see that there is a package available that is called ruby. What DNF command do you use to install this Ruby package?

dnf install ruby

You have users who need to do some programming projects in the Ruby programming language. What DNF command do you use to find out whether there is a Ruby package available for installation on the Linux server?

dnf list ruby

You have installed a package called mathpac with DNF. After a system upgrade, the package is not working correctly. Which of the following commands should you try first to get the package to function?

dnf update mathpac

What dpkg command would you enter at the command prompt to search for packages that have been partially installed on the system?

dpkg -C

What dpkg command would you enter at the command prompt to list information about a currently installed Debian package?

dpkg -p

Which of the following commands will reconfigure an already installed package?

dpkg-reconfigure

You have been asked to temporarily fill in for an administrator who has just been fired. This administrator was known to have lax security standards, and you suspect that passwords are still kept in the /etc/passwd file. Which of the following entry within the passwd file would indicate that the passwords are stored there?

kolton:34uyx:431:0:Back Door:/root:/bin/bash

What would you enter at the command prompt without options to reload the library cache every time libraries are added or removed and update the symbolic links?

ldconfig

Which of the following commands reloads the libraries for the /bin/bash executable, but does not update the cache?

ldconfig -N /bin/bash

Which of the following commands should you use to change the location of the default file used to search for libraries?

ldconfig -f

What would you enter at the command prompt to display the shared library information for executables?

ldd

Which command would you use to identify library dependencies?

ldd

Which of the following commands displays all of the shared library information for the /bin/bash executable?

ldd -v /bin/bash

Which of the following DNF options will display whether updates are available for RPM packages?

list updates

Which of the following yum options will display whether updates are available for RPM packages?

list updates

Which file stores user accounts?

passwd file

You are an IT consultant for a small company. The company wants to increase the security of their small network. You want to move their passwords from the /etc/passwd file to the /etc/shadow file. Which of the following utilities will BEST accomplish this task?

pwconv

How would you verify that a package has been installed?

rpm -q queries the computer for information about installed packages.

Which utility will extract files from an RPM package without installing the package?

rpm2cpio

Which file contains the passwords for each user account?

shadow file

What is the default primary group for each user?

the group ID field, or GID field. This references the group ID number of the user's default group. In this example, the GID for the ksanders user account is 1001. That means that the group that has a group ID number of 1001 is the ksanders user's default user group. As we said a minute ago, the description field is typically used for the user's full name.

Which of the following apt-cache options will show the missing dependencies in the package cache?

unmet

A system administrator is configuring a package manager to access packages from a local repository and take advantage of a local repository's transfer speed. Which of the following commands can be used to pull packages from an online repository? (Select THREE).

wget curl rsync

You used YUM to list the python packages that are available to install. You see that there is a package available that is called python. What YUM command do you use to install this python package?

yum install python

You have users who need to do some programming projects in the Python programming language. What yumcommand should you use to find out if there is a python package available to install on the Linux server?

yum list python

You have installed a package called mathpac with yum. After a system upgrade, the package is not working correctly. Which of the following commands should you FIRST try to get the package to funciton?

yum update mathpac

What yum command would you enter at the command prompt to determine which package contains the /usr/lib/libstlport_gcc.so file?

yum whatprovides /usr/lib/libstlport_gcc.so

What YUM command would you enter at the command prompt to download an RPM package without installing it to the system?

yumdownloader

In the /etc/shadow file, which character in the password field indicates that a standard user account is locked?

! or !!

How can you determine whether a user account is locked?

! or !! indicates that the account is locked and cannot be used to log in.

In the /etc/shadow file, which character in the password field indicates that the password is an encrypted entry?

$

You need to identify which user accounts on the Linux system have encrypted passwords. Which character in the password field of the /etc/shadow file indicates that an encrypted password is set for the user account?

$

Which dpkg option prevents a package from being installed if a newer version of the package already exists on the computer?

-G prevents a package from being installed if a newer version of the package already exists on the computer.

Which dpkg option completely removes a package and its configuration files?

-P

Which of the following dpkg options will install a package recursively?

-R

What is the full path and filename for the DNF configuration file?

/etc/dnf/dnf.conf

A file contains the following entry: sales:x:1001:pclark,mmckay,hsamson Which of the following files contains similar entries?

/etc/group

Which file contains a cached list of dynamic shared libraries?

/etc/ld.so.cache is a cached list of libraries found in the directories specified in /etc/ld.so.conf.

What is the full path and file name for the file that contains a colon-, space-, tab-, newline-, or comma-delimited list of directories in which to search for libraries?

/etc/ld.so.conf

What is the full path and file name for the YUM configuration file?

/etc/yum.conf

What is the main configuration file for the YUM package?

/etc/yum.conf

When managing DNF, what is the full path to the directory where should you place .repo files?

/etc/yum.repos.d/

When managing YUM, what is the full path to the directory where you should place .repo files?

/etc/yum.repos.d/

Which of the following directories typically hold the dynamic libraries on your system? (Select TWO).

/usr/lib/ /usr/local/lib/

During installation, you must create a root user account for the system. Which of the following user account number does this account use?

0

During a Fedora distribution installation, you choose to add a regular user account. The only other user that has been added to the system was root. Which of the following user IDs is MOST likely to be associated with the new user?

1000

Given this entry in the /etc/passwd file: pmallory:x:1001:1050:Paul Mallory:/home/pmallory:/bin/bash Which of the following is the user ID associated with this entry.

1001

What is the difference between a dynamic shared library and a static shared library?

A Dynamic library is a shared library that is not directly integrated into the code of a software application. A Static library is a shared library, usually installed with an application, the is integrated into the code of a software application.

Shared library

A library of routines that can be used by other applications.

What is the role of a package manager?

A package manager keeps track of what software is installed on your computer, and allows you to easily install new software, upgrade software to newer versions, or remove software that you previously installed.

Dynamic library

A shared library that is not directly integrated into the code of a software application.

Static library

A shared library, usually installed with an application, the is integrated into the code of a software application.

Debian packages

A software package format that is different than the RPM format.

Which of the following actions does the dpkg -l (lowercase L) command perform?

All packages with names that match a specified pattern are displayed.

What are the management complications for shared libraries?

Changes to the shared library could potentially be incompatible with some of the programs that use the library. Programs may not be able to locate the shared library. A shared library can become inaccessible if it is overwritten or updated. For instance, problems may occur if two different packages that include the same shared library are installed.

createrepo

Creates a repository list of RPM packages stored locally or on a network. Be aware of the following options: -g specifies an xml file for the repository. -x excludes specific file globs.

The graphics driver was recently updated on a system. Now, the graphical user interface (GUI) is not displaying, preventing the user from logging in. You need to access the system locally to login. Which of the following commands will access the virtual terminal tty2?

Ctrl+Alt+F2

ldd

Discovers which libraries are used by another library (e.g., library dependencies). When using ldd to track down problems, check the complete dependency chain. Run ldd as root (recommended). Be aware of the following options: -v displays all information. -u displays unused direct dependencies. --version displays the version number of ldd.

yumdownloader

Downloads a package without installing it.

What does it mean if a library file name contains .so?

Dynamic libraries have a .so or .so.version extension (.so stands for shared object).

You need the DNF utility to check specific URLs for RPM repositories. Which of the following locations should you add the URLs to?

In .repo files within the /etc/yum.repos.d/ directory.

Which of the following situations is most likely to cause a dependency problem?

Installing two different packages that both include /usr/lib/graphlib.

dpkg

Installs Debian packages on Debian distributions. Be aware of the following dpkg options: -i installs a package. --configure reconfigures an unpacked package. -r removes the package but does not delete the configuration files. -P completely uninstalls the package including the configuration files. -p lists information about a currently installed Debian package. -I (uppercase i) or --info lists information about packages that are not installed. -l (lowercase L) displays all packages with names that match a specified pattern. -L shows the installed files for a package. -S finds a package associated with specified files. -C searches for packages that have been installed only partially on the system. B disables packages that have dependencies on the package being removed. --ignore-depends ignores dependency-checking for specified packages. -no-act prevents changes from being written. -G prevents a package from being installed if a newer version of the package already exists on the computer. -E does not install the package if the same version of the package is already installed. -R installs the package recursively. The dpkg-reconfigure command reconfigures an already installed package.

Which environment variable specifies additional directories to search for library files not listed in /etc/ld.so.conf?

LD_LIBRARY_PATH

Which of the following functions does the -d option perform when using the apt-get command to install a package?

Packages are downloaded to the system, but not installed.

Which of the following functions does the dpkg --configure command perform?

Reconfigures an unpacked package

ldconfig

Reloads the library cache every time libraries are added or removed, and update the symbolic links. This creates the necessary links and cache for the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). Be aware of the following options: -v summarizes the directories and files it is registering as it reloads the cache. -N updates symbolic links, but does not update the cache. -n updates the links contained in the directories specified on the command line. -X updates the cache but does not update symbolic links. -f changes the configuration file from the /etc/ld.so.conf default. -C changes the cache location from the /etc/ld.so.cache default. -r treats a new directory as if were the root directory. This is helpful when you are recovering a badly corrupted system or installing a new OS. -p displays the current library cache, including all the library directories and their respective libraries.

Secondary group

Secondary groups are also used to manage access to files and directories.

Shadow

Shadow files, such as the /etc/shadow file, holds passwords and password expiration information for user accounts. The /etc/gshadow file holds passwords for groups

What is the purpose of a shared library?

Shared libraries make it such that software developers don't have to rewrite the same code every time they write a new program.

Locally compiled software

Software that is compiled from downloaded or custom source code.

Standard user

Standard user accounts can log into the system.

A user type has the following qualities: Created by default during the Linux installation Used by the system for specific roles Not used to log into the system Which of the following user types has these qualities?

System or service user

System or service user

System user accounts (also called service user accounts) are created by default during the Linux installation and are used by the system for specific roles.

What are the differences between standard user accounts and system user accounts?

System user accounts cannot be used to log in to the system. Instead, they're used by the services, the daemons, running on this system.

/etc/group

The /etc/group file holds group information including the group name, GID, and group membership information. Be aware of the following details: Each entry identifies a group. Each entry contains multiple fields, with each field separated by a colon. The following line is a sample entry in the /etc/group file: sales:x:510:pclark,mmckay,hsamson The fields within this line are as follows: Group name. Group password. An x indicates the group passwords are contained in the /etc/gshadow file. Group ID. Group members (contains a comma-separated list of user accounts that are members of the group).

apt-get

The Aptitude Package Manager that downloads, resolves dependencies, and installs Debian packages.

dbkg

The Debian Package Manager that installs Debian packages.

YUM

The Yellowdog Updater,Modified package manager.

DNF

The dandified YUM package manager.

You are viewing the /etc/passwd file, and you notice the following entry: pclark:x:1001:1001:Petunia Clark:/home/pclark:/bin/bash What statement BEST describes this entry?

The pclark password is stored in the /etc/shadow file.

pwconv

The pwconv command is used to move passwords from the less-secure /etc/passwd file to the more secure /etc/shadow file. The opposite of this action can be done with the pwunconv command and will also remove the shadow file. Today, however, virtually all Linux distributions ship with shadow files enabled by default. The synchronization process is as follows: The entries in the shadowed file that do not exist in the passwd file are removed. The shadowed entries that don't have x as the password in the passwd file are updated. Any missing shadowed entries are added. Passwords found in the passwd file are replaced with x.

The following line is a sample entry in the /etc/shadow file: lclark:$ab7Y56gu9bs:12567:0:99999:7::: What does the second field represent?

The users encrypted password.

How can you tell a Debian package from an RPM package?

They're not cross platform. You can install RPM packages only on RPM-based systems and Debian packages only on Debian-based systems.

pwck

Verifies the entries in the /etc/passwd and /etc/shadow files to ensure that they have the proper format and contain valid data. Errors are displayed on the screen, and entries may be deleted to solve the errors. For example, checks are made to verify that each entry has: The correct number of fields A unique and valid user name A valid user and group identifier A valid primary group A valid home directory A valid login shell

aptitude

Views the list of packages and perform package management tasks such as installing, upgrading, and removing packages in the Advanced Packaging Tool (APT). aptitude is the front-end to APT. It displays a list of software packages and allows the user to interactively pick packages to install or remove.

You are working on a Debian distribution of Linux. You want to retrieve information about the Debian package database on the system. Without using any command options, what command will provide the information you need?

apt-cache

Which command for Debian is similar to the YUM tool for RPM packages?

apt-get

You are working on a Debian distribution of Linux. You need to install a package, but you do not want to manually install all the dependencies for the package. Without using any command options, what command should you use?

apt-get

Which of the following statements correctly describe the differences between the apt-get remove and apt-get purge commands? (Select TWO).

apt-get remove removes a specified package, but leaves the configuration files. apt-get purge removes the package and the configuration files.

Which of the following apt-get options will upgrade all installed packages to the latest versions using the information in /etc/apt/sources.list?

apt-get upgrade

You have installed a package called mathpac with apt-get. After a system upgrade, the package is not working correctly. Which of the following commands is the MOST correct method to get the package to work?

apt-get upgrade mathpac

Which of the following Debian package management utilities provides the front end for APT?

aptitude

Software repository

An online location that stores software packages for a Linux distribution.

apt-get

Downloads and install packages. apt-get: Is similar to the yum utility on an RPM distribution. Gets its information about the application repositories from the /etc/apt/sources.listfile. Automatically calculates and resolves package dependencies when installing, updating, and removing packages. Be aware of the following apt-get options: update updates /etc/apt/sources.list with the latest information about available packages. upgrade upgrades all installed packages to the latest versions in accordance with the information in /etc/apt/sources.list. dist-upgrade shows all of the package's dependencies. install installs a package using the package name. The package name is not the file name. During the install, apt-get retrieves the most recent version of the package. remove removes a specified package, but leaves the configuration files. purge removes the package and the configuration files. source retrieves the latest version of the package. The command accesses the /etc/apt/sources.list file to determine whether the latest package version is installed. check checks the package database for consistency and errors. clean removes unneeded package information files and logs. This command is needed when not using the dselect utility to install Debian packages. autoclean removes information files about packages that can no longer be downloaded. -d downloads packages without installing them. -f attempts to fix a computer with unsatisfied dependencies. Use this with apt-get installand apt-get remove. -m ignores package files that cannot be accessed or located. -q shows less progress information. -s simulates package installation without doing an actual install. -y automatically provides a yes response to yes / no questions in the package installation script.

dnf

Installs RPM packages, including their dependencies. Be aware of the following actions and options: list displays lists of packages. install installs a package. Use the entire package file name when installing. list updates displays whether updates are available for packages. update updates RPM packages. list available lists packages that are available to install. search searches all packages for a specified term. info displays detailed package information. provides, whatprovidesdisplays what packages are associated with a specific file. remove, erase uninstalls a package. -y bypasses confirmation prompts.

yum

Installs RPM packages, including their dependencies. Be aware of the following actions and options: list displays lists of packages. install installs a package. Use the entire package file name when installing. list updates displays whether updates are available for packages. update updates RPM packages. list available lists packages that are available to install. search searches all packages for a specified term. info displays detailed package information. provides, whatprovidesdisplays what packages are associated with a specific file. remove, erase uninstalls a package. -y bypasses confirmation prompts.

Which of the following methods should you use to configure dynamic libraries on a Linux system? (Select TWO).

Modify /etc/ld.so.conf to add the path of the libraries. Use the LD_LIBRARY_PATH environment variable to specify additional directories to search for library files.

What are the methods for configuring additional dynamic libraries on a Linux system?

Modify /etc/ld.so.conf to add the path of the libraries. Use theLD_LIBRARY_PATHenvironment variable to specify additional directories to search for library files.

When would you use Debian packages instead of RPM packages?

Now understand that not all Linux distributions use RPM to manage software packages. The distributions that are based on the Debian distribution use the Debian Package Manager instead of RPM. Ubuntu is probably one of the most popular Debian based distributions that uses dpkg in order to manage software instead of RPM.

What sources are available for obtaining packages?

One of the things you can do with the YUM utility is view a list of all available packages that you could install. To do this, you type 'yum list'. This will take a little while to process, because there are a lot of packages available. if I wanted to view a list of all the available packages in my online repositories that I could install with DNF, I use pretty much the same command that I would have used with YUM. I type 'dnf list'. With YUM I would have typed yum list.

Primary group

Primary groups (also called the private group) are created by default on most Linux distributions when a standard user is created and are used to manage access to files and directories.

apt-cache

Retrieves information about the Debian package database. Be aware of the following apt-cache options: showpkg displays information about a package in the database. stats shows the number of packages installed, dependency information, and other package cache statistics. unmet lists any missing dependencies in the package cache. depends shows all of the package's dependencies. pkgnames displays whether a package is installed on the system. When the package name is left off, the command shows information for all packages on the computer. search searches for a package in the cache.

/etc/gshadow

The /etc/gshadow file holds passwords for groups. Be aware of the following details: Like the /etc/group file, each line corresponds to a group. Each line consists of fields separated by colons. The following line is a sample entry in the /etc/gshadow file: sales:!:pclark:pclark,mmckay,hsamson The fields within this line are as follows: Group name. Group password. The group password allows users to add themselves as members of the account. If the field contains a single exclamation point (!), the group account cannot be accessed using the password. If the field contains a double exclamation point (!!), no password has been assigned to the group account (and it cannot be accessed using the password). If there is no value, only group members can log in to the group account. Administrators. Contains a comma-separated list of users who have authorization to administer the account. Group members. Contains a comma-separated list of user accounts that are members of the group.

/etc/passwd

The /etc/passwd file holds user account information. Be aware of the following details: Each entry identifies a user account. Each entry contains multiple fields, with each field separated by a colon. The following line is a sample entry in the /etc/passwd file: pclark:x:501:501:Petunia Clark:/home/pclark:/bin/bash The fields within this line are as follows: User account name. Password. An x in the field indicates passwords are stored in the /etc/shadow file. User ID number. Primary group ID number (also known as the GID). Description field. This field is typically used for the user's full name. Path to the home directory. Path to the default shell.

/etc/shadow

The /etc/shadow file holds passwords and password expiration information for user accounts. Be aware of the following details: Using the /etc/shadow file to separate usernames from passwords increases the security of the user passwords. Like the /etc/passwd file, each entry corresponds to a user account and each entry contains multiple fields, with each field separated by a colon. The following line is a sample entry in the /etc/shadow file: pclark:$ab7Y56gu9bs:12567:0:99999:7::: The fields within this line are as follows: User account name. Password.$ preceding the password identifies the password as an encrypted entry. ! or !! indicates that the account is locked and cannot be used to log in. *indicates a system account entry and cannot be used to log in. Last change. The date of the most recent password change measured in the number of days since 1 January 1970. Minimum password age. The minimum number of days the user must wait before changing the password. Maximum password age. The maximum number of days between password changes. Password change warning. The number of days a user is warned before the password must be changed. Grace logins. The number of days the user can log in without changing the password. Disable time. The number of days since 1 January 1970, after which the account will be disabled.


Set pelajaran terkait

Discovering Design with Chemistry - Chapter 1 Review Questions

View Set

Servsafe Foodhandlers, Sanitation & Safety Study Guide-Chapter 9: The Flow of food: Service (T/F) & some ?'s

View Set

Contributions of the Cerebellum & Basal Nuclei in Motor Control (Part 2)

View Set

Substance Abuse Quiz Chapters 1 and 2

View Set

AP Psych Unit 1: History and Approaches

View Set