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



Similar documents
Using Network Attached Storage with Linux. by Andy Pepperdine

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

System Administration

Linux System Administration on Red Hat

Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0

Introduction to Operating Systems

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

Local File Sharing in Linux


TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control

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

Allion Ingrasys Europe. NAStorage. Security policy under a UNIX/LINUX environment. Version 2.01

INASP: Effective Network Management Workshops

Installing QuickBooks Enterprise Solutions Database Manager On Different Linux Servers

Procedure to Create and Duplicate Master LiveUSB Stick

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

AN INTRODUCTION TO UNIX

NAStorage. Administrator Guide. Security Policy Of NAStorage Under UNIX/LINUX Environment

System Administration and your Bio-Linux Machine

Basic Linux & Package Management. Original slides from GTFO Security

How to Tunnel Remote Desktop using SSH (Cygwin) for Windows XP (SP2)

G14 Unix Tools and Scripts to Monitor and Tune your Informix IDS Server

System Resources. To keep your system in optimum shape, you need to be CHAPTER 16. System-Monitoring Tools IN THIS CHAPTER. Console-Based Monitoring

IMPLEMENTATION OF CIPA - PUDUCHERRY UT SERVER MANAGEMENT. Client/Server Installation Notes - Prepared by NIC, Puducherry UT.

IT6204 Systems & Network Administration. (Optional)

ICS 351: Today's plan

13. Configuring FTP Services in Knoppix

Ubuntu Professional Training Course Overview (E-learning, Ubuntu LTS)

Installing Dspace 1.8 on Ubuntu 12.04

Chapter 7: Unix Security. Chapter 7: 1

Support Notes for SUSE LINUX Enterprise Server 9 Service Pack 3 for the Intel Itanium 2 Processor Family

Partek Flow Installation Guide

Some basic unix commands

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

RocketRAID 2640/2642 SAS Controller Ubuntu Linux Installation Guide

Linux Security Ideas and Tips

Redhat 6.2 Installation Howto -Basic Proxy and Transparent

NATIONAL POPULATION REGISTER (NPR)

USEFUL UNIX COMMANDS

How Do I Recover infiniti Remotes and Line Cards?

WES 9.2 DRIVE CONFIGURATION WORKSHEET

Hands-On UNIX Exercise:

The System Monitor Handbook. Chris Schlaeger John Tapsell Chris Schlaeger Tobias Koenig

HTTP-FUSE PS3 Linux: an internet boot framework with kboot

How to build secure Apache Tomcat deployments with RPM.

Linux FTP Server Setup

SYSTEM ADMINISTRATION LAB

CA and SSL Certificates

Newton Linux User Group Graphing SNMP with Cacti and RRDtool

QuickBooks Enterprise Solutions. Linux Database Server Manager Installation and Configuration Guide

Unit objectives IBM Power Systems

Setup software RAID1 array on running CentOS 6.3 using mdadm. (Multiple Device Administrator) 1. Gather information about current system.

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

Secure Shell Demon setup under Windows XP / Windows Server 2003

SAP Netweaver 7.3 on Amazon Cloud

CS197U: A Hands on Introduction to Unix

Operating System Components and Services

Net/FSE Installation Guide v1.0.1, 1/21/2008

Desktop : Ubuntu Desktop, Ubuntu Desktop Server : RedHat EL 5, RedHat EL 6, Ubuntu Server, Ubuntu Server, CentOS 5, CentOS 6

Using a login script for deployment of Kaspersky Network Agent to Mac OS X clients

INF-110. GPFS Installation

1. Introduction to the UNIX File System: logical vision

LSN 10 Linux Overview

MFCF Grad Session 2015

TOP(1) Linux User s Manual TOP(1)

The Linux System. o Updating without touching the user's files and configurations.

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

System Security Fundamentals

Planning for an Amanda Disaster Recovery System

Linux Development Environment Description Based on VirtualBox Structure

An A-Z Index of the Apple OS X command line (TERMINAL) The tcsh command shell of Darwin (the open source core of OSX)

SSL Tunnels. Introduction

On Disk Encryption with Red Hat Enterprise Linux

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

RocketRAID 174x SATA Controller Ubuntu Linux Installation Guide

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley

Data storage, backup and restore

Monitoring Clearswift Gateways with SCOM

INSTALL ZENTYAL SERVER

Redundant Array of Inexpensive/Independent Disks. RAID 0 Disk striping (best I/O performance, no redundancy!)

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

Unix/Linux Forensics 1

WebHost Manager 7 User Guide DOCUMENTATION VERSION: 1.2

NRPE Documentation CONTENTS. 1. Introduction... a) Purpose... b) Design Overview Example Uses... a) Direct Checks... b) Indirect Checks...

Back Up Linux And Windows Systems With BackupPC

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

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

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

Create a virtual machine at your assigned virtual server. Use the following specs

Massey University Follow Me Printer Setup for Linux systems

Lab 1: Introduction to the network lab

Firebird on Linux. Author: Philippe Makowski IBPhoenix Licence: Public Documentation License Date:

Linux System Administration. System Administration Tasks

System administration basics

Transcription:

Administration of Operating Systems DO2003 Mounting the file structure Devices Wecksten, Mattias 2008 Partitioning Wecksten, Mattias 2008 Files on the Hard Drive Partition = Binder with index Write file = Insert document Remove file= Erase from index Format = Replace index Wecksten, Mattias 2008 1

Disk = container of partitions HDA HDA1 HDA2 HDA3 Linux MS-dos Partitions HDA HDA1 HDA2 HDA3 /home /boot Mount partitions HDD A Partition 1, 3 Gig Partition 2, 3 Gig Partition 3, 15 Gig Partition 4, 500 Meg CD/DVD Floppy / /etc /usr /home /media /boot /mnt/cdrom /mnt/floppy 2

mount Mount makes it possible to mound devices into the file structure. mount /dev/hda2 /home mount -t ntfs /dev/hda1 /extra mount -t auto /dev/fd0 /mnt/floppy mount -t nfs server:/all_home /home mount t smbfs //ip/path /mountpoint Detailed structuring Partitions Minimal setup Partitions in Linux Size Required size Type Filsystem to use EXT3 SWAP Mount point Where to mount /home 3

Partition example Swap ~1x volatile memory (desktop). 1x - for servers. /boot Kernels + initrd (small). Partition = read only possible /usr Shared, program installations (large). /home All user files (large). Partition = portable File system commands df List partitions mount umount showmount /etc/fstab /etc/mtab Permissions Users & groups Permissions Ownership 4

Users and Groups Users Add a user Edit /etc/passwd Create folders... Use adduser Use the skel-folder Use third party software. Deactivate vs. remove users. /etc/passwd Name:Password:UserID:PrincipleGroup:Gecos:HomeDirectory:Shell smith:*:100:100:8a-4(office):/home/smith:/usr/bin/sh guest:*:200:0::/home/guest:/usr/bin/sh 5

adduser lygos% sudo adduser kalle Password: Adding user `kalle' Adding new group `kalle' (1004). Adding new user `kalle' (1004) with group `kalle'. Creating home directory `/home/kalle'. Copying files from `/etc/skel' Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for kalle Enter the new value, or press ENTER for the default Full Name []: Kalle Karlsson Room Number []: D687 Work Phone []: +46-35-123456 Home Phone []: +46-35-234567 Other []: Is the information correct? [y/n] y Edit groups groupadd newgrp /etc/group Change password lygos% passwd kalle passwd: Changing password for kalle Enter login(nis) password: ****** New password: ****** Re-enter new password: ****** NIS passwd/attributes changed on the server. lygos% sudo passwd kalle New password: ****** Re-enter new password: ****** NIS passwd/attributes changed on the server. lygos% _ 6

useradd skeleton folder % ls -A /etc/skel.bash_profile.bashrc.maildir.screenrc.tcsh.config % useradd k adam % _ Copies the skeleton to the empty user folder. How to handle MANY users? How to handle MANY users? #RNDTXT -> hgr5@%lkort5 #167 #CRYPT -> af38$12rsqqk #167 af3... 7

How to handle MANY users? #167 #uid #login #167 af3... admin #167 af3... user How to handle MANY users? #167 hgr CRYPT #uid #login #167 af3... Linux File Permissions 8

Linux file permissions drwxr-x--- 2 mayank freeos 4096 Dec 28 04:09 tmp -rw-r--r-- 1 mayank freeos 969 Dec 21 02:32 foo -rwxr-xr-x 1 mayank freeos 345 Sep 1 04:12 scr owner-group-all r read. Folders = list. Files = read. w write. Folders = change content/remove/change name. Files = write/remove/change name x execute. Fodlers = open. Files = execute. Stickybit Prevent deleteion renaming chmod +t fp setuid / setgid Files Inherit owners permissions Folders Inherit group 9

chmod raynas.hh.se% chmod 755 testtext.txt raynas.hh.se% ls -la testtext.txt -rwxr-xr-x 1 weck 6 Nov 3 09:31 testtext.txt raynas.hh.se% chmod 700 testtext.txt raynas.hh.se% ls -la testtext.txt -rwx------ 1 weck 6 Nov 3 09:31 testtext.txt raynas.hh.se% _ chown chown -vr owner filename chown owner:group filename lygos% sudo mkdir /usr/local/pgsql lygos% sudo chown postgres /usr/local/pgsql lygos% sudo chown root:users gemensam Installation Software Updates 10

Install software (RedHat) rpm - single packets rpm qa rpm i <package> rpm U <package> yum packet manager Install software (Debian) dpkg packet based apt-get update - synchronize the databases apt-get upgrade apt-get install package packet manager aptitude - better than apt-get Basic Process Handeling 11

Scheduling RUN READY WAIT Schedule examples Schedule examples (priority) 12

Processes i LINUX lygos.hh.se% ps -la F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 8 O 0 23201 23173 0 50 20? 140 pts/6 0:00 ps 8 S 616 15644 15630 0 50 20? 1074? pts/2 0:05 dtsessio 8 S 616 15904 15643 0 45 20? 139? pts/2 0:00 sh 8 S 616 15905 15904 0 40 20? 1093? pts/2 0:08 dtfile 8 S 616 15909 15905 0 40 20? 1064? pts/2 0:00 dtfile 8 S 616 15630 15627 0 54 20? 318? pts/2 0:00 tcsh 8 S 616 18612 18611 0 40 20? 915? pts/2 0:00 dtpad 8 S 616 18611 15643 0 41 20? 139? pts/2 0:00 sh 8 S 616 15643 1 0 40 20? 688? pts/2 0:01 ttsessio lygos.hh.se% _ top load averages: 0.00, 0.00, 0.01 23:06:43 48 processes: 47 sleeping, 1 on cpu CPU states: 100% idle, 0.0% user, 0.0% kernel, 0.0% iowait, 0.0% swap Memory: 256M real, 119M free, 330M swap in use, 318M swap free PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND 13492 weck 1 59 0 2808K 2464K sleep 0:00 0.23% tcsh 13488 root 1 60 0 6096K 2752K sleep 0:00 0.16% sshd 13498 weck 1 59 0 1960K 1248K cpu 0:00 0.14% top_5.9 1 root 1 59 0 1240K 184K sleep 10:59 0.02% init 13490 weck 1 59 0 6224K 2496K sleep 0:00 0.02% sshd 209 root 27 59 0 4712K 3096K sleep 22:06 0.00% nscd 184 root 15 59 0 3504K 1648K sleep 20:14 0.00% syslogd 145 root 1 59 0 2208K 1128K sleep 18:20 0.00% inetd 9029 nobody 1 59 0 3912K 2224K sleep 11:36 0.00% lmgrd 21697 root 1 59 0 3344K 1784K sleep 9:47 0.00% sshd Process management If you start a program from the shell, the shell will wait for the program to exit before you can do anything more. To interrupt the program you press <ctrl><c> This usually exits the program back to the terminal. To suspend the program you press <ctrl><z> This puts the process resting in the background and you get back the terminal. To restart the program in the foreground again, give the command fg. To restart the program in the background, give the command bg. 13

Background processes Start a process as a background process. lygos.hh.se% netscape & [1] 23276 lygos.hh.se% _ Kill processes kill pid lygos.hh.se% ls -R /* > /dev/null & lygos.hh.se% ps PID TTY TIME CMD 23173 pts/6 0:00 ls 23170 pts/6 0:00 tcsh lygos% kill 23173 [1]Terminated ls -R /* > /dev/null lygos% _ Stop signals ALRM 14 exit HUP 1 exit INT 2 exit (equal to ctrl-c) KILL 9 exit (this signal can not be caught) PIPE 13 exit TERM 15 exit ABRT 6 core FPE 8 core ILL 4 core QUIT 3 core SEGV 11 core lygos% kill -9 23173 TRAP 5 core [1]Terminated ls -R /* > /dev/null lygos% _ 14

Filtering signals To avoid the hup signal you can start a program with nohup. lygos.hh.se% nohup netscape & [1] 23276 Sending output to nohup.out lygos.hh.se% _ Priority Lower lygos% nice -5 netscape & Increase lygos% sudo nice --5 netscape & Control priority lygos.hh.se% ps PID TTY TIME CMD 23173 pts/6 0:00 netscape 23170 pts/6 0:00 tcsh lygos% renice -5 23173 lygos% _ 15