UNIX System Administration S Y STEMS



Similar documents
Linux System Administration. System Administration Tasks

Linux Crontab: 15 Awesome Cron Job Examples

Facultat d'informàtica de Barcelona Univ. Politècnica de Catalunya. Administració de Sistemes Operatius. System monitoring

Introduction to Linux (Authentication Systems, User Accounts, LDAP and NIS) Süha TUNA Res. Assist.

HP-UX Essentials and Shell Programming Course Summary

Local File Sharing in Linux

Introduction to AIX 6L System Administration Course Summary

Thirty Useful Unix Commands

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Increasing XenServer s VM density

UNISOL SysAdmin. SysAdmin helps systems administrators manage their UNIX systems and networks more effectively.

System Administration

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

Task Scheduler. Morgan N. Sandquist Developer: Gary Meyer Reviewer: Lauri Watts

Managing Linux Users and Groups

CPSC 2800 Linux Hands-on Lab #7 on Linux Utilities. Project 7-1

Linux System Administration on Red Hat

USEFUL UNIX COMMANDS

Unit objectives IBM Power Systems

CIT 470: Advanced Network and System Administration. Topics. Performance Monitoring. Performance Monitoring

Sophos Anti-Virus for Linux configuration guide. Product version: 9

Audit Trail Administration

Sophos Anti-Virus for Linux user manual

HP-UX System and Network Administration for Experienced UNIX System Administrators Course Summary

Sophos Anti-Virus for Linux configuration guide. Product version: 9

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

Navigating the Rescue Mode for Linux

Backing Up TestTrack Native Project Databases

Lesson Plans Microsoft s Managing and Maintaining a Microsoft Windows Server 2003 Environment

Getting Started in Red Hat Linux An Overview of Red Hat Linux p. 3 Introducing Red Hat Linux p. 4 What Is Linux? p. 5 Linux's Roots in UNIX p.

Debian and Windows Shared Printing mini HOWTO

Using Network Attached Storage with Linux. by Andy Pepperdine

Partitioning. Files on the Hard Drive. Administration of Operating Systems DO2003. Partition = Binder with index. Write file = Insert document

Using PowerBroker Identity Services to Comply with the PCI DSS Security Standard

Backup Tab. User Guide

Server Management Tools (ASMT)

Distributed Computing under Linux

20 Command Line Tools to Monitor Linux Performance

Backup policies. Or - how not to get annoyed when you accidentally delete stuff. Warning - this does get a little technical

JAMS 6.X Client Features 3. Working with Jobs 4-5. Submitting Jobs Manually 6-7. Working with Setups 8-9. Working with Views 10-14

The Linux Operating System and Linux-Related Issues

Plesk 8.3 for Linux/Unix Acronis True Image Server Module Administrator's Guide

Changing the Fundamentals of Data Storage for SuperComputers

Backup Tab. User Guide

Objectives. At the end of this chapter students should be able to:

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

Newton Linux User Group Graphing SNMP with Cacti and RRDtool

Module Title: Advanced Systems Administration 2

Acronis Backup & Recovery 10 Server for Linux. Command Line Reference

CS10110 Introduction to personal computer equipment

PRINT CONFIGURATION. 1. Printer Configuration

1. Introduction to the UNIX File System: logical vision

Operating system Dr. Shroouq J.

CHAPTER 15: Operating Systems: An Overview

CloudVPS Backup Manual. CloudVPS Backup Manual

IT6203 Systems & Network Administration. (Optional)

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

USTM16 Linux System Administration

EVault for Data Protection Manager. Course 361 Protecting Linux and UNIX with EVault

PREPARED BY: AUDIT PROGRAM Author: Lance M. Turcato. APPROVED BY: Logical Security Operating Systems - Generic. Audit Date:

RedHat (RHEL) System Administration Course Summary

These sub-systems are all highly dependent on each other. Any one of them with high utilization can easily cause problems in the other.

RH033 Red Hat Linux Essentials or equivalent experience with Red Hat Linux..

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

Get quick control over your Linux server with server commands

IBM Tivoli Network Manager IP Edition V3.8

Red Hat System Administration 1(RH124) is Designed for IT Professionals who are new to Linux.

IBM i Version 7.2. Security Service Tools

ICS Technology. PADS Viewer Manual. ICS Technology Inc PO Box 4063 Middletown, NJ

Getting Started With Your Virtual Dedicated Server. Getting Started Guide

GLS250 "Enterprise Linux Systems Administration"

EXi PREP. Solaris 10. System Administration. llllllllllllllll. Bill Calkins. ULB Darmstadt

A candidate following a programme of learning leading to this unit will be able to:

Fiery EX4112/4127. Printing from Windows

SendMIME Pro Installation & Users Guide

Setting up PostgreSQL

Using Process Monitor

Enabling Backups for Windows and MAC OS X

Extreme Linux Performance Monitoring Part II

NovaBACKUP. Storage Server. NovaStor / May 2011

Network Attached Storage. Jinfeng Yang Oct/19/2015

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer

Xerox EX Print Server, Powered by Fiery, for the Xerox 700 Digital Color Press. Printing from Windows

Configuration Backup Restore

WebEx Integration to Lotus Notes. Users Guide

COS 318: Operating Systems

UNIX - FILE SYSTEM BASICS

Job Streaming User Guide

Linux Security Ideas and Tips

IT Essentials II: Network Operating Systems v3.0 Scope and Sequence

Introduction to Operating Systems

Transcription:

UNIX System Administration CS 40: INTRODUCTION TO U NIX A ND L I NUX O P E R AT ING S Y STEMS

Objectives Discuss UNIX system administration, including the following categories: Job scheduling/monitoring User management/monitoring File system/disk space management Printer management

Job Scheduling/Monitoring Multiple jobs can be run in UNIX interactively They can be grouped together or made conditionally to run What ways have we learned already?

In the Past We ve learned that we can run a process in the background while running one currently (e.g. task &) What other ways are there?

Revisiting at We ve also used the at command to run processes in the future: $ at now+2min > date > who > Ctrl-D We can actually allow and deny user to use the command at To allow a user, add them to the file /usr/lib/cron/at.allow To deny a user, add them to the file /usr/lib/cron/at.deny

crontab We also have available a UNIX command, cron, which is the system process which will automatically perform tasks for you according to a set schedule We can edit this schedule from which these processes are performed through a program called crontab, short for cron table

Add a Job to the crontab Each job is one line in the crontab Each line must contain 6 pieces of information The first 5 pieces make up when to run the job The last piece is what job is going to run More specifically

Add a Job to the crontab (2) m h dom mon dow command A number (or list of numbers, or range of numbers), m, representing the minute of the hour A number (or list of numbers, or range of numbers), h, representing the hour of the day A number (or list of numbers, or range of numbers), dom, representing the day of the month

Add a Job to the crontab (3) m h dom mon dow command A number (or list, or range), or name (or list of names), mon, representing the month of the year A number (or list, or range), or name (or list of names), dow, representing the day of the week command, which is the command to be run, exactly as it would appear on the command line

Add a Job to the crontab (4) A "number" is an integer (e.g.) A "list of numbers" is a set of integers separated by commas (e.g. 15, 30, 45), which would represent just those three numbers A "range of numbers" is a set of numbers separated by a hyphen (e.g. 10 20), which would represent all the numbers from 10 through 20, inclusive

Add a Job to the crontab (5) Field Allowed Values minute 0-59 hour 0-23 day of month 1-31 month day of week 1-12 (or names) 0-7 (0 or 7 is Sunday, or use names)

Add a Job to the crontab (6) Names can also be used for the "month" and "day of week" fields Use the first three letters of the particular day or month (case doesn't matter) Ranges or lists of names are not allowed

crontab Example We want our job to run at 5 A.M., which would be minute 0, hour 5, every day of the month, every month, every day of the week We need to add a line to the bottom of the file which looks like this: 0 5 * * * /home/myname/scripts/do-every-day.sh

top Display system summary information as well as a list of tasks currently being managed by the Linux kernel

top Example [deepak@server1 ~]$ top top - 17:51:07 up 1 day, 2:56, 27 users, load average: 5.33, 29.71, 28.33 Tasks: 1470 total, 1 running, 1469 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 264114424k total, 253006956k used, 11107468k free, 66964k buffers Swap: 33554424k total, cached 3260k used, 33551164k free, 245826024k

top Example (2) PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1960 deepak 15 0 30452 3220 1540 R 2.3 0.0 0:00.78 top 2457 root 11-5 0 0 0 S 2.3 0.0 11:36.93 kacpid 2493 pmartprd 16 0 1397m 289m 9.8m S 0.3 0.1 18:36.07 pmrepagent 4639 pmartprd 15 0 787m 54m 4080 S 0.3 0.0 5:19.55 pmserver 14402 root RT 0 151m 5256 2872 S 0.3 0.0 1:41.40 multipathd 17886 root 10-5 0 0 0 S 0.3 0.0 0:07.41 kondemand/11

User Management/Monitoring While only one user can sit in front of the screen and use the keyboard at any one time, any number of users can log in to the system through the network To use the system, each user should have their own user account By doing this, we can have multiple users use the system at one time

UNIX Account Types There are three common types of accounts on a Unix system: Root account System accounts User accounts In addition, we will also talk about a concept known as the Group Account

UNIX Account Types: Root Account This is also called superuser Would have complete and unfettered control of the system A superuser can run any commands without any restriction This user should be assumed as a system administrator

UNIX Account Types: System Account Those needed for the operation of system-specific components (e.g. mail accounts and the sshd accounts) Usually needed for some specific function on your system Any modifications to them could adversely affect the system

UNIX Account Types: User Account Provide interactive access to the system for users and groups of users General users are typically assigned to these accounts Usually have limited access to critical system files and directories

UNIX Account Types: Group Account UNIX supports a concept of Group Account, which logically groups a number of accounts Every account would be a part of any group account UNIX groups plays important role in handling file permissions and process management

UNIX User Administration Files Here are the main user administration files: /etc/passwd: keeps user account and password information; this file holds the majority of information about accounts on the Unix system /etc/shadow: holds the encrypted password of the corresponding account; not all UNIX systems support this file /etc/group: this file contains the group information for each account /etc/gshadow: this file contains secure group account information

Managing Users in UNIX We have commands to manage users in UNIX: useradd: adds a user account to the system usermod: modifies the attributes of a user account already on the system userdel: deletes a user account from the system We also can modify the password of a user using the command passwd Use the d option to delete a forgotten password: passwd d

Managing Groups in UNIX Similarly, we have commands to manage groups in UNIX: groupadd: adds a group to the system groupmod: modifies the attributes of a group already on the system groupdel: deletes a group from the system

last Searches back through the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created Examples: $ last $ last -f /nas/server/webserver/.log/wtmp

last Sample Output $ last root pts/1 10.1.6.120 Tue Jan 28 05:59 still logged in root pts/0 10.1.6.120 Tue Jan 28 04:08 still logged in root pts/0 10.1.6.120 Sat Jan 25 06:33-08:55 (02:22) root pts/1 10.1.6.120 Thu Jan 23 14:47-14:51 (00:03) root pts/0 10.1.6.120 Thu Jan 23 13:02-14:51 (01:48) root pts/0 10.1.6.120 Tue Jan 7 12:02-12:38 (00:35) wtmp begins Tue Jan 7 12:02:54 2014

wall Abbreviation of write to all Displays the contents of a file or standard input to all logged-in users

wall Examples alice@sleipnir:~$ wall Remember to brush your teeth! ^D alice@sleipnir:~$ wall <<< 'Remember to brush your teeth!

wall Examples (2) alice@sleipnir:~$ cat.important_announcement Remember to brush your teeth! alice@sleipnir:~$ wall.important_announcement # same as `wall!$` Broadcast Message from alice@sleipnir (/dev/pts/7) at 16:15... Remember to brush your teeth!

File System/Disk Space Management In the last lectures, we ve spoken about how the file system is laid out in its most basic form In the next couple of slides, we ll look at some of the commands which help us with how to maintain the file system and manage our disk space and how it s used

File System/Disk Space Management Commands Command du quota mount umount find Description Summarize disk usage Restrict the amount of disk space used Mount file systems and remote resources Unmount file systems and remote resources Search for files and perform actions when found

File System/Disk Space Management Commands (2) Command fsck dump restore tar Description Check and repair file systems Backup your file system(s) Restore a backed up file system Archive files

Printer Management Printing documents is an important part of any UNIX system Managing printers are manageable on a UNIX system as there are only a few commands to get this task done

Printer Management Commands Command lp/lpr lpstat cancel lpsched lpshut lpadmin Description Print, route, hold, and schedule a time for print jobs Print information about the status of the lp print service Cancel requests to line printer Start printer services Stop printer services Identify a printer to the lp print service

CUPS Stands for Common UNIX Printing System With so many different UNIX variants these days, can be difficult to develop printer drivers to support all the different UNIX printing systems Provides a common printing system interface, based on the Internet Printing Protocol (IPP)

CUPS (2) Defines how to: Manage jobs Set printer options Adds security features for printing over the Internet Once installed, provides a complete printer management environment that includes lp, lpr, and all of their commands