25
Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION College of Information Technology Universiti Tenaga Nasional (UNITEN) SN 2017 1

Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

  • Upload
    vohuong

  • View
    240

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Chapter 1 Introduction to System

Administration

CSNB113 SYSTEM ADMINISTRATION

College of Information Technology

Universiti Tenaga Nasional (UNITEN)

SN 2017

1

Page 2: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Define the system administrator’s position

Log in to root

Understand the usage of su command

Know the administrator’s roles and privileges

Able to explain the skills required to be a system administrator

Discover the UNIX architecture that includes the kernel and shell

2

Objectives

SN 2017

Page 3: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

A single-trusted person that is responsible to administrate the whole system

Known as superuser or root user (UNIX environment) - hold absolute power to the system

Use special user-id to log on to the system: root

3

Definition of System Administrator

SN 2017

Page 4: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Default user ID for system administrator – user ID and password is automatically created during installation

User ID = 0 (zero)

Use to perform administrative task

4

root

SN 2017

Page 5: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

root (cont.)

5

login: root

password:

# pwd

/

#

Command for print working directory

Output: / means root directory

Prompt: # indicates login as root

SN 2017

Page 6: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

su command - Switch from nonprivileged account to the superuser account

Other command: sudo <command>

6

su

SN 2017

Page 7: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

su command with ‘-’ argument

7

Argument ‘-’ ensures that

the administrator is presented the same environment as he/she logged in to root

Recreates user’s environment

Runs as separate sub shell

login: surizal

password:

$ whoami

surizal

$ su –

password:

# pwd

/root

#

SN 2017

Page 8: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

su command without ‘-’ argument

8

To execute command as root but retain user’s current environment

login: surizal

password:

$ whoami

surizal

$ su

password:

# pwd

/home/surizal

#

SN 2017

Page 9: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Exit su mode

9

Exit sub shell

Press [Ctrl+d] or exit command

$ su –

password:

# exit

$

SN 2017

Page 10: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Modify the contents or attributes of any files – although owned by other users

Initiate or kill any process – except essential for running the system

Change any user’s password – without entering the old password

Set the system clock

Control user’s access to;

Scheduling service

Networking service

10

Administrator’s Privileges

SN 2017

Page 11: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Responsible for installing, supporting, and maintaining servers or other computer systems

Installing and configuring new hardware and software

Performing routine audits of systems and software

Performing backups and restores

Applying OS updates, patches, and configuration changes

Adding, removing, or updating user accounts information such as resetting passwords

11

Administrator’s Roles

SN 2017

Page 12: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Planning and responding to service outages and other problems that occur within the system Capacity planning

Contributing and implementing Disaster Recovery (DR) and Business Continuity (BC) plans and planning

Introducing and integrating new technologies into existing data center environments

Analyzing system logs and identifying potential issues/problems in the systems

Troubleshooting any reported problems

12

Administrator’s Roles (cont.)

SN 2017

Page 13: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Scripting; light programming, project management for systems-related projects, supervising or training computer operators

Automate common or repetitive (routine) tasks

Consultant for computer problems beyond the knowledge of technical support staff

Answering technical queries

13

Administrator’s Roles (cont.)

SN 2017

Page 14: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Problem-solving skill

On call when a computer system malfunction

Quickly and correctly diagnose the crisis and produce the best solution

Analyzing skill

Understand the behavior of software

Deploy

Troubleshoot problems

14

Skills Required

SN 2017

Page 15: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Programming skill

Understand some various types of programming languages

Scripting or automation of routine tasks

Soft-skills

Users feel warm and know that their problems will be fixed in no time

Good interaction among colleagues/team members

15

Skills Required

SN 2017

Page 16: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

16

CATEGORIES OF SYSTEM

ADMINISTRATOR

SN 2017

Categories of System Administrator

Page 17: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

UNIX Architecture

17

Monitor

User Interface tool

Software

Operating System

Printer

CPU

Hard

Drive

Hardware

User

Shell

Kernel

SN 2014 SN 2017

Page 18: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Kernel

Core of the operating system (OS)

Interacts with the machine hardware- most notably memory and CPU time

Part of the operating system that loads first, and it remains in main memory

Kernel code is usually loaded into a protected area of memory to prevent it from being overwritten by programs or other parts of the operating system.

When the computer starts, it goes through some initialization (booting) function, such as checking memory.

Perform housekeeping –memory, schedule processes, prioritize 18

SN 2017

Page 19: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Type of shell

sh

One of the original shells is Bourne shell called “sh”

Developed for Unix computers by Stephen Bourne at AT&T's Bell Labs in 1977

Offers features such as input and output redirection, shell scripting with string and integer variables, and condition testing and looping.

bash

Bourne-again Shell called bash

An upgrade for “sh” with several enhancements

Linux systems still offer the “sh” shell, but "bash“ has become the new default standard.

Ability to run “sh” shell scripts unchanged.

19

SN 2017

Page 20: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Type of shell

csh and tcsh C-shell," csh, have been developed by Bill Joy at Berkeley University in 1978 using C syntax

as a model. Ken Greer took csh concepts a step forward with a new shell, tcsh, which Linux systems

now offer. Tcsh fixed problems in csh and added command completion, in which the shell makes

educated "guesses" as you type, based on your system's directory structure and files. Tcsh does not run bash scripts, as the two have substantial differences.

ksh Developed by David Korn , korn shell or ksh about the time tcsh was introduced. Compatible with sh and bash. Improves on the Bourne shell by adding floating-point arithmetic, job control, command

aliasing and command completion. AT&T held proprietary rights to ksh until 2000, when it became open source.

20

SN 2017

Page 21: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Prompt

The prompt, $, which is called command prompt, is issued by the shell. While the prompt is displayed, you can type a command.

The shell reads your input after you press Enter. It determines the command you want executed by looking at the first word of your input. A word is an unbroken set of characters. Spaces and tabs separate words.

21

SN 2017

Page 22: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Uptime - time that the system is running ('up'), or should be up Time since last reboot

% of time the system is up

Downtime – time when the system is not running Scheduled (planned) downtime: the administrator purposely shuts

down or reboots the system; eventually the users are informed in advance

Unscheduled (unplanned) downtime: the system fails: 'crash', no power, BSOD (Blue Screen Of Death), kernel panic

22

Common Term

SN 2017

Page 23: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Uninterruptable Power Supply (UPS)

Provides immediately 'kick-in' continuous power supply from batteries without affecting the server operation

'Intelligent' UPS communicates with machine:

Warning the operator/user that mains is gone

Shuts down the machine shortly before the batteries are exhausted

Dual Power Supplies

Each is able to power the machine on its own. When one is defunct, the other can take over immediately and completely ('Redundant‘)

23

Unscheduled Downtime: Precaution

SN 2017

Page 24: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

Dual fans

When one fan stops functioning, a second fan sets in automatically and immediately

Redundant hard disks

When one hard disk fails, a replacement hard disk takes over transparently

24

Unscheduled Downtime: Precaution (cont.)

SN 2017

Page 25: Chapter 1 Introduction to System Administrationmetalab.uniten.edu.my/~surizal/System Administration/CSNB113... · Chapter 1 Introduction to System Administration CSNB113 SYSTEM ADMINISTRATION

1. Das, S. (2012). Your UNIX/LINUX The Ultimate Guide: Third Edition. McGraw-Hill

2. Hahn, H. (2008). Harley Hahn's Guide to Unix and Linux. California: McGraw-Hill Higher Education

25

References

SN 2017