Chapter 2. Accessing a Linux System

Chapter 2. Accessing a Linux System
Log in to a Local Linux System
Guided Exercise: Log in to a Local Linux System
Using the Command Line
Guided Exercise: Using the Command Line
Lab: Accessing a Linux System
Summary
Abstract


Goal 
Interact with the GNOME desktop, and query the terminal environment.

Sections 
Log in to a Local Linux System (and Guided Exercise)

Using the Command Line (and Guided Exercise)

Lab 
Accessing a Linux System


Log in to a Local Linux System
Objectives
Log in to a Linux system by using the GNOME desktop manager (GDM) and a text-based console.

The Multiuser Linux System
The Linux operating system is designed to support multiple concurrent users. Each person using the computer can have a personal account on the system. After you log in, you can create and save data in your own home directory, which is separate from any other user. Instead of sharing login credentials, each user owns a unique login account. This practice provides privacy to each user and protects your data from being accidentally deleted or changed by other users.

This principle also applies for system data and configuration. You have full control over your own login environment, but unless you are an administrator, you cannot make system changes. Linux is a robust multiuser operating system because it separates the role of a user from the role of an administrator and compartmentalizes users from one another.

The Administrative Account
The root user is the initial account on a Linux system. This user is also known as the super user or administrator.

The root user is not intended for regular use, because it does not have restrictions on modifying or even deleting critical system configuration. For this reason, many distributions do not set a password for the root user, effectively locking the account.

During the Linux system installation, a normal user account is created for each new user. These normal user accounts are also called unprivileged or standard accounts because their level of access is limited. These unprivileged accounts are allowed to change personal settings but system-wide modifications are restricted. However, standard users can be given access to privilege escalation tools to allow them to make certain changes that normally only the root user can perform.

Important
Even if you have the password for the root user, you should avoid using the account. Using this account can increase the chance that it could be compromised.

Logging in to a Linux System
Over the years, Linux has developed different environments for interacting with the system. As a result, there are also different methods for logging in. For example, a personal workstation uses a graphical environment, but a cloud computer might use only a text interface.

Learning different ways to log in to Linux is helpful because Linux systems are widely available in modern computing, and use various environments for interacting with the system.

The Linux Console
A console is a display device to which a Linux system prints messages and a user can input text. The console is the default environment if the system does not have a graphical environment installed.

When the system finishes booting up, the console provides a text interface that requests a username and a password. The interaction with a console is limited because the console requires a display device, but you cannot run graphical applications. You can only interact with the console by providing text input.
               Figure 2.1: Linux console prompt

Using a console might also require additional software and configuration when working with a remote system. For example, the classroom lab environment for this course uses virtual machines (VMs) that you access over a Virtual Network Computing (VNC) connection. VNC is a screen sharing software that is used to remotely control systems. The VNC connection to the classroom allows you to access the Linux console.

When using VNC, there is a slight delay on the typing and mouse movement because you are not interacting physically with the operating system. This behavior is one reason that many systems administrators prefer to log in to Linux computers using a minimal text-only interface. When working with remote systems, using a text-only interface is faster because there is less data sent back and forth.

The GNOME Graphical Desktop Environment
Linux also offers a graphical interface to interact with the system. Linux uses GNOME to provide a graphical environment to users. GNOME is an open source desktop environment designed for Linux and other Unix-like operating systems. GNOME follows the same conventions of other operating systems that use a windowing system.

After a Linux computer that has a graphical desktop environment installed boots up, it displays a login screen. This is the GNOME Display Manager (GDM), a system service that handles user logins and authentication.

Note
Not all Linux systems include a graphical environment. Most Linux systems that are used as servers reduce the software and tools that are installed (including graphical environments) to optimize the computer resources. However, Linux workstations have a graphical environment installed by default.

If there are multiple user accounts on the computer, then select your user identity and enter your password. If yours is the only user account on the system, then GDM shows your account. Click the account name, enter your password, and press Enter to authenticate.

After you login, you are presented with a desktop session. This desktop is unique to Linux, but it follows the same conventions found in most other operating systems. There are applications to navigate the Internet, to view your files and directories (or folders), to install software, and so on.

Figure 2.2: GNOME desktop
Unlike other desktop environments, the GNOME desktop starts in a dashboard view. This view exposes the three main components of the graphical environment:

In the upper left corner, the Activities Overview organizes windows and starts applications. You can toggle between the dashboard view and the desktop view by clicking Activities, or by pressing the Super key.

In the upper right corner, the System Menu provides access to common settings, including your network, audio volume, Bluetooth controls, and a menu to log out.

At the bottom of the screen, the Taskbar (also known as the dash panel) contains common application launchers. Click the grid icon to see all the applications that are installed on the system.

The Web-based Administration Console
In Linux, a best practice is to limit the access of a user to only the required resources to complete a task. Similarly, there might be scenarios where access to a machine is limited for security reasons. However, HTTP communication is often enabled and widely available.

In these scenarios, you can use the web-based administration console called Cockpit. Cockpit is an administration tool with modules to interact with the underlying system. Cockpit is sponsored by Red Hat and is installed by default in many Linux distributions.

Cockpit uses existing user accounts to authenticate and creates a session as the logged user. If you log in as an unprivileged user or your user does not have escalation privileges, then some tasks are restricted, but you can view system information, update your password, install applications, and so on.

To log in to Cockpit, open a web browser and navigate to the https://localhost:9090 website. The localhost string instructs the web browser to search for the service in the local machine, and the :9090 string instructs the web browser to search for the service in the 9090 port.

Note
The Cockpit service might not be started when the system boots up. Consult the reference section for more information about the Cockpit service.

The browser displays a certificate warning because Cockpit uses a self-signed certificate. Confirm the security exception and authenticate by using your user and password.

Figure 2.3: Cockpit dashboard
After logging in, Cockpit displays a dashboard with system information.

Guided Exercise: Log in to a Local Linux System
Log in to a Linux system and review user settings.

Outcomes


Log in to a RHEL system by using the GNOME Desktop Manager (GDM).

Navigate the Cockpit console.


As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.

[student@workstation ~]$ lab start access-login
Instructions

Log in as the operator1 user by using the GNOME Desktop Manager (GDM).

From the system menu, click Power Off/Log Out > Log Out. Confirm the operation by clicking Log Out.

On the login screen, select the operator1 user and use redhat as the password.

Try to update the operator1 user password.

From the System Menu, click Settings.

Alternatively, click Activities in the upper left of the desktop, and then type and select Settings.

In the left panel, click Users. This module is blocked to the operator1 user. You can try to unlock it by clicking Unlock.

The system asks for the student user password because the operator1 user cannot unlock the Users control panel. Only administrative users have permission to alter the system.

Click Cancel and close the Settings window.

Log in as the root user by using the GDM.

From the system menu, click Power Off/Log Out > Log Out. Confirm the operation by clicking Log Out.

On the login screen, click Not listed. Use root as the username and redhat as the password.

Immediately after logging in, GDM shows a banner with the following information.

Logged in as a privileged user
Running a session as a privileged user should be avoided for security reasons.
If possible, you should log in as a regular user.
Log out of the root desktop session.

On the login screen, select the student user and use student as the password.

Review the Cockpit console.

Click Activities in the upper left of the desktop, and then type and select Firefox.

Navigate to https://localhost:9090.

The browser displays a certificate warning because Cockpit uses a self-signed certificate. Click Advanced, and then click Add Exception. Click Confirm Security Exception to accept the self-signed certificate. Click Advanced on the warning page, and then click Accept the Risk and Continue.

Authenticate by using operator1 as the user and redhat as the password. Click Log in.

Take some time to review the modules in the console.

On the Cockpit console, update the operator1 user's password. Set rh104.course as the new password.

In the left panel, click Accounts. The console shows the list of existing users. Click the operator1 user.

Click Set password.

Use redhat as the Old password. Use rh104.course as the New password. Confirm the new password. Click Set password.

Test the new password for the operator1 user.

Log out of the Cockpit console by clicking Session > Log out.

Authenticate by using operator1 as the user and rh104.course as the password. Click Log in.

Log out of the Cockpit console by clicking Session > Log out.

Close the Firefox window.

Finish

On the workstation machine, use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish access-login

Komentar

Postingan populer dari blog ini

AI Image/Video Prompt Guide

Wacana PLTN Kalimantan: Apakah Indonesia Benar-Benar Siap?