Download as pdf or txt
Download as pdf or txt
You are on page 1of 63

Department of Computer Science

Network and System Administration

1
Chapter One
Introduction to System and Network Administration
2 Outline

What is a system and system Administration ?

Who is system administrator and what are the responsibilities ?

What is network and network administration ?

Who is network administrator and what are the responsibilities ?


3 What is system?
 A system is a group of related things that work toward a common goal.

 A system could be a mechanical device, a computer, an office of workers, a


network of humans and machines, a series of forms and procedures a bureaucracy
etc.

 A computer system is usually understood to mean a system composed primarily


of computers, using computers or supporting computers.

 A human-computer system include the role of humans such as in a business


enterprise where computers are widely used.
Cont…
4

For example
Computer system
Human organ system
Network system
What is administration ?
5
 In human-computer system administration, the definition is broadened to include
all of the organizational aspects and also engineering issues, such as system fault
diagnosis.
 The main issues are the following:
 System design and rationalization
 Resource management
 Fault handling
 In order to achieve these goals, it requires
 Procedure
 Team work
 Ethical practices
 Appreciation of security
6 What is a system administration?
 System administration is the field of work in which some one manages one or more
systems, be they software, hardware, servers or workstations.
 Its goal is ensuring the systems are running efficiently and effectively.
 For example
 Installation, support, maintenance, supervising…
 Skills required
 Operating system
 Applications
 Hardware
 Software troubleshooting
 Computer security
 Programming languages (scripting)
Who is system administrator?
7
 A technical person who manage the system is called system administrator.
 Duties/ Responsibilities of system administrator;
 Morning checks of systems/software.
 Performing backups of data.
 Applying operating system updates, and configuration changes.
 Installing and configuring new hardware/software.
 Adding/deleting/creating/modifying user account information, resetting passwords, etc.
 Answering technical queries.
 Responsibility for security.
 Responsibility for documenting the configuration of the system.
 Troubleshooting any reported problem or reported problems.
 System performance tuning.
 Keeping the network up and running.
8 Cont…
…User Account Management
User Ids
Mail
Home directories (quotas, drive capacities)
Default startup files (paths)
Permissions, group memberships,
accounting and restrictions
Communicating policies and procedures
Disabling / removing user accounts
9 Cont…
….Hardware Management
 Capacity planning
 Inventory
 Hardware evaluation and purchase
 Adding and removing hardware
 Configuration
 Cabling, wiring, DIP switches, etc.
 Device driver installation
 System configuration and settings
 User notification and documentation
Cont…
10
… Data Backups

 Perhaps most important aspect!


 Disk and backup media capacity planning
 Performance, network and system impact
 Disaster recovery
 Onsite/Offsite
 Periodic testing
 Multiple copies
 User communication
 Schedules, restore guarantees and procedures,
loss tolerance
11 Cont…
… Software Installation/Maintenance
 Evaluation of software
 Downloading and building (compiling and
tweaking)
 Installation
 Maintenance of multiple versions
 Security
 Patches and updates
 User notification, documentation
12
Cont…
…System Monitoring
 Hardware and services functioning and operational
Capacity
 Disk, RAM, CPU, network
 Security
 Passwords
 Break-ins
 System logs
 Examination
 Periodic rotation and truncation
13
Cont…
… Troubleshooting
 Problem identification
 By user notification
 By log files or monitoring programs
 Tracking and visibility
 Ensure users know you’re working on problem
 Provide an ETA (Estimated Time of Arrival) if possible
 Finding the root cause of problems
 Provide temporary solution if necessary
 Solve the root problem to permanently eliminate
14
Cont…
… Local Documentation
 Administrative policies and procedures
Backup media locations
Hardware
Location
Description, configuration, connections
 Software
 Install media (or download location)
 Installation, build, and configuration details
 Patches installed
 Acceptable use policies
15
Cont…
…. Security Concerns
 System logging and audit facilities
 Evaluation and implementation
 Monitoring and analysis
 Traps, auditing and monitoring programs
 Unexpected or unauthorized use detection
 Monitoring of security advisories
 Security holes and weaknesses
 Live exploits
16
What is network?
 A computer network is defined as a group of two or more computer systems
linked together.
17 What is network administration ?
 Network administration is the field of work in which someone manages one or
more network.

 A network administrator is responsible for keeping an organization’s computer


network up-to-date and operating as intended.

 Responsibilities of network administrator

 Network monitoring

 Uses of a system that monitors a computer network for slow or failing components
and notifies network administrator.
Cont…
18
 Testing the network for weakness

 A penetration test, pen test or ethical hacking etc.

 Keeping for needed updates

 Installing and implementing security programs

 In many case, e-mail and internet filters

 Evaluating implementing network


19 The Challenges of system administration
 System admin Not just installing system/software, also about planning and
designing an efficient community of computers so that the real users will able to
get their jobs done.
Design a network which is logical and efficient.
Deploying large numbers of machines which can be easily upgraded later.
Decide what and where services are installed.
Plan and implement adequate security.
Provide a comfortable environment for users.
Develop ways of fixing problems and errors.
20 Ethical issues
 Because computer systems are human-computer communities, there are ethical
considerations involved in their administration.

 A system administrator has many responsibilities and constraints to consider.

 Ethically, the first responsibility must be to the greater network community, and
then to the users of our system.

 An administrator’s job is to make users’ lives bearable to empower them in the


production of real work.
Overview of operating system (Os)
21  An operating system (Os) is a program that manages the computer hardware.
 It also provides a basis for application programs and act as an intermediary between computer user
and computer hardware.

 System programs are software used to directly modify or directly give the command to the computer.
 Application programs are software that are used to perform specific tasks.
 Software program that provides service for computer user
 Cannot act without “permission” from
operating system
Cont…
22
 For example : if there is no operating system.
 User 1 want to write some document file and want to save it on the computer hard
disk
 How can user 1 perform this activity?
 User 1 explicitly tells the computer that what he wants to do by writing a code.
 This is the most tedious things to do.
 If the computer had operating system, all process will handed by the Os.

Windows, UNIX, Linux, mac OS X iOS, Android etc.


23 Functions Os
o Initialize computer hardware
o Allocate system resources to programs
o Keep track of multiple programs running at same time
o Provide organized method for all programs to use system devices

Major operating system components:


 Kernel
 Device drivers
 Shell
 Utility programs
 Graphical user interface (GUI)
Introduction to UNIX
24

 Unix is a multi-user, multi-tasking operating system.


 You can have many users logged into a system simultaneously, each running many
programs.
 It's the kernel's job to keep each process and user separate and to regulate access to
system hardware, including cpu, memory, disk and other I/O devices.
 First Version was created in Bell Labs in 1969.
 Some of the Bell Labs programmers who had worked on this project, Ken
Thompson, Dennis Ritchie, Rudd Canaday, and Doug McIlroy designed and
implemented the first version of the Unix File System on a PDP-7 along with a few
utilities.
 It was given the name UNIX by Brian Kernighan.
Cont…
25

 1973 Unix is re-written mostly in C, a new language developed by Dennis Ritchie.

 Being written in this high-level language greatly decreased the effort needed to
port it to new machines.

 1977 There were about 500 Unix sites world-wide.

 1980 BSD 4.1 (Berkeley Software Development)

 1983 SunOS, BSD 4.2, System V

 1988 AT&T and Sun Microsystems jointly develop System V Release 4 (SVR4).
This later developed into UnixWare and Solaris 2.

 1991 Linux was originated.


What is Linux?
26
 Linux is a free Unix-type operating system originally created by Linus Torvalds with
the assistance of developers around the world.
 It originated in 1991 as a personal project of Linus Torvalds, a Finnish graduate
student.
 The Kernel version 1.0 was released in 1994 and today the most recent stable
version is 2.6.9
 Developed under the GNU General Public License , the source code for Linux is
freely available to everyone.
 Linux really refers to the kernel – most of the commands that you are familiar with
are really separate programs, not specific to Linux, and often are part of the Free
Software Foundation's GNU project.
 Linux was first developed for 32-bit x86-based PCs (386 or higher). These days it
also runs on dozens of other processors.
27
FHS – Filesystem Hierarchy Standard
The Filesystem Hierarchy Standard (FHS) is a vendor-independent
guideline that specifies the layout of the upper levels of the file
system tree.
 Aims to provide consistency across UNIX versions
 SuSE linux conforms quite closely to the FHS guidelines
FHS distinguishes two major characteristics of files
 Sharable (across multiple machines) vs non-sharable
 Static (do not change without system admin intervention) vs dynamic
Filesystem hierarchy
28
29
Root directory and root partition
 The root directory is the top level directory of the tree

 Do not confuse this with the home directory of the superuser, which is usually /root

 The root partition is the partition containing the root directory

 At boot time, the root partition is initially the only one mounted

 Files needed at boot time must be in directories on the root partition

o /bin, /dev, /etc, /lib and /sbin


Binary directory: /bin
30

 /bin contains important executable (binary) programs


 Needed early in boot sequence
 Needed for emergency maintenance if other partitions unavailable
 Includes shells, filesystem maintenance commands, other tools
 Contents include:
31 Boot directory: /boot
 /boot contains the files needed to get the linux kernel up and running
 Second-stage files for the boot loader (GRUB or LILO)
 Backup of Master Boot Record
 The image of the linux kernel
 Sometimes /boot is on a separate partition
 Early stages of booting on a PC rely on the PC's BIOS firmware to access the hard
drive.
 On early PCs the BIOS could not access cylinder numbers beyond 1023 so it was
essential that the kernel image lay below this boundary
 Putting /boot on a separate (small) partition guarentees this
Device files: /dev
32
 Device files give file names to hardware devices
 Associates a name (e.g. /dev/hda1) with a major / minor device number
 Identifies the device and the driver used to read/write data on the device

 Usually all required device files are created automatically


 Many reference hardware which is not actually present
 The mknod command is used to create new device files
 When you first boot up your computer it detects your hardware and place folder
and files representing your hardware in the dev directory.
33 Cont…
Configuration files: /etc
34  /etc contains system configuration files
 mostly plain text; editable using any text editor
 More importantly, the /etc /rc.d directory contains the system startup scripts.
 This is a good directory to backup often. Saves lot of reconfiguration later if you
re-install or lose your current installation.
User directories: /home
35
 /home contains the home directories of individual users
 After login, a user's current directory is his home directory
 /home is often on a separate partition
 or may be mounted from a file server – this arrangement means that users are not tied
to specific machines
 A user's personal configuration files are stored in his home directory
 “Hidden” files (name starts with '.')
 Examples: .bashrc, .profile, .bash_history, .xinitrc
 The shell recognizes '~' as a shorthand for your home directory
 Example: ~/.bashrc
Libraries: /lib
36
 A library is a collection of compiled binary files
 Contains code for functions used by many programs
 A program that needs access to library functions links to the required libraries at run
time (dynamic linking)
 UNIX refers to dynamically linked libraries as shared objects (.so files)
 /lib contains the essential system libraries needed to run the commands in the root
filesystem i.e. /bin and /sbin
 /lib/libc.so.6 is the main C runtime library
 Most other application libraries are in /usr/lib
 /lib/modules contains dynamically loaded kernel modules
Directory of applications /opt
37
 The /opt directory is used to store the 'static' files of additional applications such as
Netscape, Gnome, KDE, or Open Office

 Note that the open source community does not always follow this guideline. When
applications are installed by compiling from source code, the default installation
directory is usually /usr/local
 This can be changed using command line options when the application is installed.
 This directory contains all the software and add-on package that are not part of the
default installation.
Process files /proc
38
 The files in /proc are a figment of the kernel's imagination
 Make internal kernel information available via normal file read commands
 There is a subdirectory for each process, named after the process ID
 Other 'files' in /proc provide information about the system as a whole
Directory of the administrator /root
39

 The super-user's home directory is /root

 On the root partition

 Allows root to login even if no additional partitions can be mounted – the home
directories for ordinary accounts (under /home) may be on a separate partition
40
System administration commands: /sbin
 /sbin contains binaries essential for booting, restoring, recovering, configuring or
repairing the system
 Usually only root can run these programs to make changes to the system
 /sbin lies in the root partition
Server directories and temporary area
41
 /srv contains site-specific data which is served by this system
 Typically broken down into subdirectories based on the protocol used to serve the data,
e.g. /srv/www and /srv/ftp
 Note that many linux systems do not follow this FHS guideline
 /tmp contains temporary files
 Anyone can create files in /tmp
 Programs should not rely on files surviving in /tmp between one program invocation
and the next
 Some administrators set up the system to empty /tmp at boot time
 Important to avoid name clashes in /tmp – some applications include their process ID
within the file name
42
The /usr hierarchy

 The FHS standard defines a second level of directories under /usr


 Sharable (across machines); “static” files that do not normally change
 Often on a separate partition; may be mounted read-only
 Subdirectories include:
43
Changeable files: /var
/var contains data files that change during normal system operation
 Spool directories and files
 Administrative and logging data
 Transient and temporary files
 Key subdirectories include:
44
Filesystems

 In computing, a file system or filesystem controls how data is stored and retrieved.
 Without a filesystem, data placed in a storage medium would be one large body of
data with no way to tell where one piece of data stops and the next begins.
 File and file system are at the very heart of what system administration about.
 Every task in host administration or network configuration involves making changes
to files.
 The file system is organized in a hierarchy (tree)
 The “root directory” (/) is at the top of the tree.
 Pieces of the filesystem may exist on multiple disk partitions or on remote file
servers on the network.
 The pieces are 'mounted' onto directories to make the file system appear as a single
tree
45
File types
 Several types of object exist in the filesystem
 Normal files
 A set of contiguous data identified by a name
 Inclues text files, graphics files, exécutable programs, etc;
 The filesystem does not distinguish the type of data.
 '.' is not a special character in file names and the filesystem does not recognize
separate names and extensions (e.g. report.txt), though many applications do use an
extension to identify the type of data in the file
 Directories
 Directories contain named 'links' to other files
 They cannot be opened, read and written like ordinary files
Cont…
46
 Device Files
 Devices (disks, tape drives, mice, etc) are identified by device file entries which are
usually in the /dev directory.
 If access permissions allow, some device files may be opened, read and written like
ordinary files (for example an archive may be written directly to a tape device).
 Symbolic Links
 References to files located at other points in the file system.
 Allow a single file to be referenced using multiple names.
 Symbolic links can be opened like regular files, but the operation is automatically
redirected to the file that the link points to.
 Sockets and FIFOs
 Named communication end points used for inter process communication
File names
47
 File names can be up to 255 characters long
 Case sensitive
 All characters except '/' are legal in filenames
 '/' is used as a separator in path names
 Some characters have special meaning to the shell. They are awkward to work
with in file names and are best avoided:
 +, %, $, #, !, \, -, ~, =, space, others ...
 Recommend use only upper and lower case letters, digits, and '_‘
 Maximum length of a path name is 4096 characters
48
File system types
Native linux file system formats
49
 Linux supports many file system formats.
 Ext:
 “ext” is an acronym that stands for “extended file system” and was created in 1992 and is the
very first file system designed specifically for Linux.
 Ext2
 referred to as “second extended system” Created in 1993.
 Probably the most common 'native' linux file system format
 Ext3
 Extension of ext2 to support journaling, backwards compatible
 A journaling file system is a system that records in a separate log changes
and updates to files and data before such actions have been completed.
 Much faster to check file system consistency after a crash
50 Cont…
 Ext4:
 ext4, standing for “fourth extended system”, was created in 2006.
 Because this file system overcomes numerous limitations that the third
extended system had, it is both widely used, and the default file system that
most Linux.
 Reiser File System
 A more modern journaling file system, not compatible with ext2
 Larger administrative overhead, do not use on very small partitions
 Others
 Extent File System”, was created by Silicon Graphics and originally made for their OS
“IRIX”, but was later given to Linux.
 Can choose file system types at installation time
51 File system formats of other systems
 Linux also supports the native file systems of other operating systems
 Useful on dual-boot systems
 FAT, VFAT
 Used on floppies, and Windows 95/98
 NTFS
 Used on Windows NT, 2000, XP
 Under linux, only read access is supported reliably
 HPFS
 Native file system of OS/2
 CDROM
 ISO9660 with Joliet and Rockridge extensions
52 Network file system formats
 Linux can also mount file systems from remote file servers using a number of file
sharing protocols

 NFS (Network File System)

 The native UNIX file sharing protocol, originally from Sun Microsystems

 SMB (Server Message Block)

 The native Windows file sharing protocol, supported on linux by the Samba package

 NCP (Network Core Protocol)

 The native netware protocol


53
Logging in
54

 After booting, a desktop SuSE Linux system will usually present a graphical login
dialog
 Enter your login name and password (both are case sensitive)
 KDE desktop environment started
 Systems (eg servers) which do not run a graphical desktop will present a
command line login
 Enter login name and password
 A 'shell' (command interpreter) is started
 Please log in now:
 Log in as the user 'tux'
 Supply the password 'penguin'
Logging out
55

 To logout from a command-line environment:

 Enter the “end of file” character (usually ^D)

 Or type the command exit

 Please:

 Log out

 Log back in again


The shell
56
 The 'shell' is the linux command interpreter
 The shell operates in a command processing loop:
 Displays a 'prompt' and reads a command line
 Peforms various substitutions and expansions on the command line
 Executes the resulting command and waits for it to finish
 Loops back and prompts for another command
 Several shells have been written for UNIX and Linux
 Bourne shell (sh), Korn Shell, C Shell, Bourne Again Shell (bash)
 The core feauture set of all these shells is very similar
 We will focus on bash, the most popular shell on Linux
Simple commands
57

 Try these simple commands:


Command options
58
 Command options modify the behaviour of a command
 Usually, an option is a single letter prefixed by '-'
Command arguments
59
 Most commands accept arguments
 The command name, options, and arguments are separated by whitespace (spaces
and tabs)
 Arguments are often the names of files or directories on which to operate
60
Command history
 bash remembers the most recent commands you've entered
 stored in the file .bash_history in your home directory
 survives across logout / login, shared by all instances of bash
 size of history file is configurable, set to 500 commands in SuSE Linux
 The history command shows your command history

 Previous commands can be selected and re-executed


61
Cont…
You can also edit your command history on screen.
62 Cont…
 To provide you with a command history, execute the following commands:

 Recall your command history with the history command


 Recall the date command by command number
 Recall the most recent command beginning with 'ho'
 Using the arrow keys, recall the 'ls' command, changing the file name from
hosts.allow to hosts.deny
63

Thank you!

You might also like