System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:

Slides:



Advertisements
Similar presentations
Unix Systems Performance Tuning Project of COSC 513 Name: Qinghui Mu Instructor: Prof. Anvari.
Advertisements

Linux Users and Groups Management
Basic Unix system administration
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 12.
Chapter 2 Accessing Your System and the Common Desktop Environment.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Lesson 22 – Introduction to Linux Systems Administration.
Performance Tuning By Samriti Uppal Dec 1 st, 2004.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Linux+ Guide to Linux Certification, Second Edition
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Linux System Administration LINUX SYSTEM ADMINISTRATION.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
Linux Filesystem Management
Booting and boot levels
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Performance Monitoring.
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.
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.
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Linux+ Guide to Linux Certification, Third Edition
Managing Users Objectives Contents Practicals Summary
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
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) 
There are three types of users in linux  System users: ?  Super user: ?  Normal users: ?
Managing Users  Each system has two kinds of users:  Superuser (root)  Regular user  Each user has his own username, password, and permissions that.
Lecture – Performance Performance management on UNIX.
UNIX (Linux) Introduction Module-1. OS Kernel In computing, the kernel is the central component of OS. It is a bridge between applications and the actual.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 9: Linux Network Services Chapter 16: Administration Tasks By Fred R. McClurg Linux Operating.
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.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 9: Basic Linux Administration Chapter 11: System Administration: Core Concepts Chapter 16:
Introduction to System Admin Sirak Kaewjamnong. 2 The system administration’s job  Adding a new user  Doing backup and restoring files from backups.
Unix Comp-145 L ECTURE 9: I NTRODUCTION TO S YSTEM A DMINISTRATION S OURCE : S. D AS, “Y OUR U NIX : T HE ULTIMATE G UIDE ”, 2 ND E DITION, M C G RAW H.
Λειτουργικά Συστήματα - Lab1 Γιάννης Πετράκης. The Operating System  Unix is a layered operating system  The innermost layer is the hardware that provides.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Manually Creating a New User Account Presented by Carl South.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
Lecture – Users and groups
Linux Use the Command-Line Interface to Administer the System.
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
SUSE Linux Enterprise Desktop Administration Chapter 9 Manage Users, Groups, and Permissions.
Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses. ©Copyright Network Development Group Module 14 Managing.
LINUX SYSTEM ADMINISTRATION
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
Linux203Training Module System Mgmt.
System Programming and administration CS 308
Basic Commands ls cp ls –l (in detail format) echo ls –a
UNIX System Overview.
Chapter 4 Booting and Shutdown
Chapter 2 User Management
Linux Users and Groups Management
Structure of Processes
COP 4343 Unix System Administration
Process Description and Control
LINUX SYSTEM ADMINISTRATION
System & Network Administration (MCSA & RHCSA)
Administering Users and Groups
Linux Filesystem Management
Administering Users and Groups
Adding New Users.
Access Control and Audit
Presentation transcript:

System Administration

Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory: / When root changes its password, no prompt for exiting password. Root’s value for PATH –Never includes the current directory –Only includes /sbin or /user/sbin or both /sbin contains most administrative commands

Acquiring Superuser Privileges System adminstrator can acquire superuser privileges without using root login id by using su command: $ su – Password: ******** # Including - after su assures same environment as root. Omitting - after su assures environment of user account from which su is executed, e.g., user’s home directory su is also used by non-privileged users to become the superuser $ su – rbournique # need user login id To exit su mode, type exit or ctl-D

Add users and manage groups, e.g. change a user’s password Monitor and control system startup (boot) and shutdown Monitor and control the performance of system resources, e.g. Change the contents/ attributes of files, delete files, limit file sizes Initiate or kill any process except those necessary to run UNIX Control user access to scheduling services like at and cron Control access to networking services like ftp and remote login Perform backups (and restores) of critical files and data. Set or reset system clock Use wall command to broadcast messages to all users Kinds of Activities System Administrators Do

How System Administrators Do Their Job System administrators are super script writers !! Scripts are used to: Search through event and error logs Do nightly backup of drives and create archives Initiate scheduled maintenance Monitor CPU, network status Monitor free disk space crontab used to schedule administrative scripts

A group is a set of users having a separate set of privileges. Every user has a primary group and 1 or more supplementary groups. Commands for group are groupadd, groupdel and groupmod These commands edit entries in the file /etc/group GroupName:Passwd:GID_Num:GrpMemberLst 1st field: name of the group 2 nd field: generally not used 3 rd field: group number 4 th field: all users for whom this group is supplementary Example: staff::1: Group staff is group 1 and has no supplementary users in it. Managing Groups

Commands for managing users are useradd, userdel and usermod These commands edit entries in the file /etc/passwd UserName:Passwd:NumID:NumGID:Comment:HomeDir:Shell 1st field: name of the user 2 nd field: usually X, generally not used (shadow passwords) 3 rd field: numeric user ID 4 th field: numeric group ID (primary group) 5 th field: comment field (aka GCOS field) 6 th field: user’s home directory 7 th field: user’s default shell Example: rick:x:17:1:Bournique:/home/rick:/bin/sh Managing Users

Adding a User $ useradd –u 17 –g staff -c “Bournique” –d /home/rick –s /bin/sh –m rick Deleting a User userdel [-r] rick Modifying a User’s Password Entry usermod [-c comment] [ -d home dir ] [ -e expire date] [ -g group] [ -l login] [ -p passwd] [ -s shell] [ -u uid] rick User Command Usage

System state of UNIX is determined by its run level: 0 System shutdown 1 System Admin mode (local file system mounted) 2 Multi-user mode (NFS not available) 3 Full multiuser mode 5 Graphical environment mode in Linux 6 Shutdown and reboot mode s /S Single user mode (file system mounted). At each level, a distinct set of processes, scheduled to run. The init process controls the way UNIX is booted & powered down. On boot, init run level moves to 1 or s On shutdown, init run level moves to 0 or 6 UNIX Run Levels

init takes all its instructions from /etc/inittab file /etc/inittab contains instructions for what programs to run in each run level System administrator maintains /etc/inittab, e.g., insert entries for adding a new terminal to the system Administrator also issues shutdown command: issues wall to announce shutdown order to logoff sleeps for 1 minute sends signals to processes for normal termination logs off remaining users and kills processes unmounts all secondary file systems issues sync to write memory-resident data to disk Monitoring Start Up and Shutdown

System Resources That Need Performance Monitored CPU Utilization (monitoring fair allocation of time slices) Memory Utilization (context switching /swapping time and frequency) Disk space Usage I/O Time (amount of time spent moving data and servicing I/O requests) Network Usage Time Application Program Usage

Some UNIX Performance Monitoring Commands ps -display processes running in the system cron -perform process scheduling fsck - file system consistency check netstat -display network statistics nfsstat - display network file system (NFS) statistics time -display process’ CPU utilization df -display disk free report uptime -display system load average iostat -display input and output statistics vmstat -display memory, CPU, disk utilization reports

uptime : Report System Load Average # uptime 12:04am up 215 day(s), 8:37, 2 users, load average 0.11, 0.10, 0.12 Translation: Current time is 12:04 am, system has been up 215 days since 8:37; there are 2 users; five minutes ago load average was 0.11, ten minutes ago was 0.10 and fifteen minutes ago was 0.12.

vmstat : Virtual Memory Statistics General form: vmstat interval number Example: Show memory stats in 5 second intervals, 3 times # vmstat 5 3 procs memory page disk faults cpu r b w swap free re mf pi po fr de sr s0 s1 s2 s6 in sy cs us sy id # procs (Processes) r Number of run-able processes during the interval. (excludes processes waiting or in I/O) bNumber of processes that are blocked waiting for I/O or other event. wNumber of processes that are swapped out. A non zero value means system was swapping

vmstat: Virtual Memory Statistics continued memory swap used swap space free available free swap space page pi 1 kb pages per second that have been paged in po 1 kb pages per second that have been paged out de anticipated short term memory shortfall disk s0, … number of disk operations per second on each disk drive faults in device interrupts per interval sy system calls per interval cpu cs CPU context switch rate us percentage of total CPU time spent in user state sy total CPU time spent in system state id percentage of total CPU time that CPU is idle

iostat: Disk Activity Statistics General Form: iostat [ ] [ ] Example: To have iostat show stats for all drives in 2 second intervals: # iostat 2 device bps sps msps c1t6d c1t3d # bps Average number of kilobytes per second during previous interval for disk. sps Average number of seconds per seek. msps Average number of milliseconds per seek.