Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright 2001-2003.

Slides:



Advertisements
Similar presentations
Basic Unix system administration
Advertisements

Operating system services Program execution I/O operations File-system manipulation Communications Error detection Resource allocation Accounting Protection.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 12.
Linux+ Guide to Linux Certification, Second Edition
File management in UNIX and windows 2000
Linux+ Guide to Linux Certification, Second Edition
Chapter 10 Linux 10.1 User Interface Administration
Guide To UNIX Using Linux Third Edition
System Startup and Shutdown
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Linux+ Guide to Linux Certification, Second Edition
1. This presentation covers :  User Interface Administration  Files System and Services Management 2.
Linux Installation and Administration – Lesson 5 Tutor: George Papamarkos Topic: Devices in Linux.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Booting and boot levels
Filesystem Hierarchy Standard (FHS) –Standard of outlining the location of set files and directories on a Linux system –Gives Linux software developers.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
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.
CT 320 Midterm Study Guide.
2/19/2003 Lecture 3 Computer System Administration Lecture 3 Setup (continued)
Linux Operations and Administration
Linux+ Guide to Linux Certification, Second Edition
Adding New Users User as an entity - username(UID), GID. UID - typically a number for system to identify the user. GID – a number that recognizes a set.
Chapter 6: Linux Filesystem Administration
Linux+ Guide to Linux Certification, Third Edition
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
The Linux Operating System Lecture 3: Becoming the Superuser and Users and Groups The Tonga Institute of Higher Education.
Users Greg Porter V1.0, 26 Jan 09. What is a user? Users “own” files and directories Permission based on “ownership” Every user has a User ID (UID) 
Managing Users  Each system has two kinds of users:  Superuser (root)  Regular user  Each user has his own username, password, and permissions that.
Managing processes and services. 1. How Linux handles processes 2. Managing running processes 3. Scheduling processes.
Linux+ Guide to Linux Certification, Second Edition Chapter 10 Managing Linux Processes.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Scis.regis.edu ● CS 468: Advanced UNIX Class 4 Dr. Jesús Borrego Regis University 1.
Chapter 3 & 6 Root Status and users File Ownership Every file has a owner and group –These give read,write, and execute priv’s to the owner, group, and.
Linux+ Guide to Linux Certification Chapter Eleven Managing Linux Processes.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
Linux File system Implementations
Manually Creating a New User Account Presented by Carl South.
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
THE FILE SYSTEM Files long-term storage RAM short-term storage Programs, data, and text are all stored in files, which is stored on.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Introduction to AFS IMSA Intersession 2003 Managing AFS Services Brian Sebby, IMSA ‘96 Copyright 2003 by Brian Sebby, Copies of these slides.
1 The File System. 2 Linux File System Linux supports 15 file systems –ext, ext2, xia, minix, umsdos, msdos, vfat, proc, smb, ncp, iso9660, sysv, hpfs,
1 COP 4343 Unix System Administration Unit 8: – at – cron.
Chapter 10 Periodic Processes Unix System Administration.
Linux Filesystem Administration
Getting Started with Linux
The Linux Kernel About 6 million lines of code
Operating System Basics
System Programming and administration CS 308
lctseng / Liang-Chi Tseng Edit: yench
Chapter 9 Periodic Processes
Basic Commands ls cp ls –l (in detail format) echo ls –a
Unix System Administration
Linux Start Sequence Summary
System Administration
Adding New Users, Storage, File System
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Lecture 43 Syed Mansoor Sarwar
SUSE Linux Enterprise Desktop Administration
Periodic Processes Chapter 9.
Linux Filesystem Management
January 26th, 2004 Class Meeting 2
Presentation transcript:

Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright

(C) Doug Bowman, Virginia Tech, System administration Thus far, we’ve only discussed: the use of UNIX from an end user point of view System programming - accesses the core OS but doesn’t change the way it operates System administration is another level: changing the way the system is set up and operates for end users Strongly related to security issues

(C) Doug Bowman, Virginia Tech, The superuser Most sys. admin. tasks can only be done by the superuser (also called the root user) Superuser has access to all files/directories on the system can override permissions owner of most system files Shell command: su Set current user to superuser or another user with proper password access

(C) Doug Bowman, Virginia Tech, Administration through files As you would expect, system settings are stored in files Most of these are stored in /etc We’ll look at files related to: Users and groups File systems System initialization System upkeep In section 5 of the man pages

(C) Doug Bowman, Virginia Tech, /etc/passwd Information about system users bowman:x:65:20:D.Bowman:/home/bowman:/bin/ksh login name [encrypted password] user ID group ID “real” name command interpreter home directory

(C) Doug Bowman, Virginia Tech, /etc/group Information about system groups faculty:x:23:bowman,ribbens,mcquain group name [encrypted group password] group ID list of group members

(C) Doug Bowman, Virginia Tech, /etc/fstab Information about file systems /dev/cdrom /cdrom iso9660 defaults,ro,user,noauto 0 0 mount point file system type file system (local device or remote dir.) mount options other flags

(C) Doug Bowman, Virginia Tech, /etc/inittab and /etc/init.d/ inittab : configuration file for the init process Defines “run levels” init.d : Directory containing system initialization scripts Script rc is run at run level n Starts and stops various services

(C) Doug Bowman, Virginia Tech, Configuring the system Often by directly editing files with a text editor In some cases there are programs that modify the files for you Many systems also have nice graphical user interfaces that let you manipulate these files indirectly

(C) Doug Bowman, Virginia Tech, File System Implementation A possible file system layout

(C) Doug Bowman, Virginia Tech, Internal View of a File System Boot Block: The first block in a UNIX file system, contains the boot program and other initialization information or unused. Super Block Always the second block, contains the complete “catalog” of specific information about the file system, including lists of free memory

(C) Doug Bowman, Virginia Tech, Internal View of a File System Inode list blocks List of inodes for the file system, contiguous and always follows the super block. The number of inodes is specified by the system administrator File access and type information, collectively known as the mode. File ownership information. Time stamps for last modification, last access and last mode modification. Link count. File size in bytes. Addresses of physical blocks.

(C) Doug Bowman, Virginia Tech, Internal View of a File System Data blocks OS files, user data and program files etc.

(C) Doug Bowman, Virginia Tech, File system Commands mount mount a file system umount unmount a file system fsck check and repair a Linux file system sync flush filesystem buffers

(C) Doug Bowman, Virginia Tech, crontab Useful to have a script or command executed without human intervention a script to verify that the networks are working correctly cron daemon reads cron configuration files called “crontab” short for “cron table” parse crontabs find the soonest command to be run go to sleep until the command’s execution time has arrived

(C) Doug Bowman, Virginia Tech, What’s cron and crontabs? Under UNIX, periodic execution is handled by the cron daemon read one or more configuration files containing as following command lines times at which they are to be invoked (on some systems) login names under which they are to run crontabs /etc/crontab

(C) Doug Bowman, Virginia Tech, Format of Crontab files Seven or six fields minute hour day month weekday [username] command an asterisk matches all possible values, a single integer matches that exact value, a list of integers separated by commas (no spaces) used to match any one of the values two integers separated by a dash (a range) used to match any value within the range

(C) Doug Bowman, Virginia Tech, Example crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ 01 * * * * root nice -n 19 run-parts /etc/cron.hourly 02 4 * * * root nice -n 19 run-parts /etc/cron.daily 22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly * * root nice -n 19 run-parts /etc/cron.monthly