Unix Systems Administration

Slides:



Advertisements
Similar presentations
LinuxChix Africa UNIX BASICS. To r00t or not to r00t ● Unix security is (in most cases) binary. Either you are root or you are not. – Effects on permissions.
Advertisements

1 Introduction to UNIX Ke Liu
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
1 Using Editors Editors let you create and edit ASCII files UNIX normally includes two editors: vi and Emacs Vi and Emacs are screen editors: they display.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Lecture 02CS311 – Operating Systems 1 1 CS311 – Lecture 02 Outline UNIX/Linux features – Redirection – pipes – Terminating a command – Running program.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
1. This presentation covers :  User Interface Administration  Files System and Services Management 2.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Managing User Accounts. Module 2 – Creating and Managing Users ♦ Overview ► One should log into a Linux system with a valid user name and password granted.
Unix Basics Chapter 4.
A few Linux basics Network Monitoring & Management.
Intro. To Unix commands For those who’ve never used Unix before Quick tutorial to let you move around your Unix Accounts No discussion of inner workings.
Editing, vi and Configuration Files Introduction to Linux June 16, 2009 Papeete, French Polynesia Hervey Allen.
Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to.
Tony Kombol.  Why text edit?  Many programs and features require configuration ▪ Configuration is kept in files ▪ Usually in the /etc directory  Changes.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
1 FreeBSD Installation AFNOG X Cairo, Egypt May 2009 Hervey Allen.
Getting Started with Linux Linux System Administration Editors.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Editing, vi and Configuration Files Introduction to Unix May 25, 2008 Rabat, Morocco Hervey Allen.
1 FreeBSD Installation AFNOG Chix 2011 Blantyre, Malawi 31 st Oct - 4 th Nov 2011 Dorcas Muthoni and Evelyn Namara.
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Installing Applications in FreeBSD lctseng. Computer Center, CS, NCTU 2 Before we start  Permission issue root: the super user Like administrator in.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Introduction to UNIX and Linux.  Written by Dennis Ritchie and Ken Thomsom at Bell Labs in 1969  Initially written in assembly language and a high-level.
Getting Started with Linux Linux System Administration Editors.
ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 14 – UNIX vi text editor.
Virtualisation Exercise Installing VirtualBox Installing FreeBSD in a virtual machine Chris Wilson Joel Jaeggli AfNOG 2012.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
FreeBSD Introduction Joel Jaeggli rehashed for pacnog 2006.
...looking a bit closer under the hood
Installing Applications in FreeBSD
GRID COMPUTING.
CS1010: Intro Workshop.
Development Environment Basics
SUSE Linux Enterprise Desktop Administration
Lab 05 Firewalls.
Getting started with CentOS Linux
...looking a bit closer under the hood
UNIX The Basics Source:
Basic Commands ls cp ls –l (in detail format) echo ls –a
Hands On UNIX AfNOG 2010 Kigali, Rwanda
Part 3 – Remote Connection, File Transfer, Remote Environments
Guide To UNIX Using Linux Third Edition
Our chosen platform is:
Editing, vi and Configuration Files
Ubuntu Working in Terminal
Vi Editor.
Vi Introduction Tony Kombol.
Editing, vi and Configuration Files
Linux System Administration Editors
Hands On UNIX AfNOG X Cairo, Egypt
Users and Accounts Lab 0.1. Users and Accounts Lab 0.1.
Engineering Innovation Center
Unix : Introduction and Commands
...looking a bit closer under the hood
Web Programming Essentials:
Introduction Paul Flynn
Run Java file with Window cmd
Getting started with CentOS Linux
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Chapter 2 Basic vi Editor.
Presentation transcript:

Unix Systems Administration Introduction to systems Administration

To r00t or not to r00t Unix security is (in most cases) binary. Either you are root or you are not. Effects on permissions Windows comparison with no users (win 3.x) to “kinds of users” i.e administrator(s) etc. Group permissions in UNIX also available using /etc/group

Safety Regulations Have a non root user for non privileged operations. (use pw useradd to add a user) Use su when you need root. Do NOT leave a root user logged in Chose root password (as with any other password) particularly carefully. (Other security considerations covered elsewhere)

Worksheet 1: pw useradd <USERNAME> -m passwd <USERNAME> <ALT>+F<N> to switch terminals Login with username and password created su Doesn't work – why? Switch back to first terminal Run pw usermod <USERNAME> -G wheel

Switch back to user terminal (ALT+F2) Try su – still doesn't work.. why? Type “id” to see what the system thinks of us Log out and log in again Type “id” again Now try su After you have done that, you can log out with “exit”

Filesystem Recap: no drives on system – only one huge filesystem (set of directories and files). Physical (or otherwise) devices are attached to the system with the “mount” command (read the man page) To detach devices from the filesystem we use the “umount” command. (read the man page) mount with no options lists the mounted systems. Check UNIX handout for other filesystem commands.

Worsheet2 ls /cdrom (should be empty) mount -r -t cd9660 /dev/acd0 /cdrom ls /cdrom (should have contents of CD drive) less /cdrom/README.TXT (case sensitive) 'q' to quit umount /cdrom to unmount (always do this before ejecting any removable media)

Package Management Easy way to install, programes are precompiled – quick to manage. Has a few problems: Compiler optimisations absent Optional features may not exist e.g. Database support. FreeBSD is to pkg_* as RedHAT is to rpm ... almost. pkg_info, pkg_add, pkg_delete etc (read man pages)

worksheet3 Mount your FreeBSD CD1 in your CDROM drive. pkg_add /cdrom/packages/All/bash-2.05b.007_4.tbz pkg_info -L bash\* (note the backslash is to escape the *) All files under /usr/local Type bash Doesn't work? Why? Rehash and try again.

Most common is vi only that it has lots of modes that are interesting. [ESC] key to go to command mode from any mode 'i' key from command mode to start editing text Refer to UNIX command reference ee is also another common UNIX editor – not always avaiable on some systems (e.g in single user mode to be discussed later) Commands are executed using the [CTRL]+<somekey> Help screen displayed in editor Editors

Editor worksheet ifconfig -l (to list your network cards) vi /etc/rc.conf Scroll down to bottom line. Type i ifconfig_rl0=”196.200.218.N/24” (replace rl0 with correct card) default_router=”196.200.218.254” Hit [ESC] Type :wq!

Editor worksheet continued vi /etc/resolv.conf Add the lines... search e0.ws.afnog.org nameserver 196.200.218.100 nameserver 196.200.222.1 Type :wq (to write and quit)

Enabling SSH vi /etc/rc.conf Add the line... sshd_enable=”YES” vi /etc/ssh/sshd_config Look for the line that says “#PermitRootLogin no” and change it to “PermitRootLogin without-password” (do not include the quotes and remember to remove the # ) use the “x” key to delete the characters you do not need including the initial “#” then use the i key to enter “insert mode” to add the characters you need. When done save the file with [ESC] then “:wq”