Week Eleven Agenda Announcements Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming.

Slides:



Advertisements
Similar presentations
Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
Advertisements

Chapter One The Essence of UNIX.
Week Eleven Agenda Announcements Open Source Presentation dates July 27 and August 3 Link of the week Review week ten lab assignment Week ten expected.
Race Condition Zutao Zhu 10/09/09. Outline Race Condition –Some functions –File format of /etc/passwd and /etc/shadow –Input Redirection Format-string.
Linux+ Guide to Linux Certification, Second Edition
System Startup and Shutdown
Guide To UNIX Using Linux Third Edition
Linux+ Guide to Linux Certification, Second Edition
Linux System Administration LINUX SYSTEM ADMINISTRATION.
Advanced Shell Programming. 2 Objectives Use techniques to ensure a script is employing the correct shell Set the default shell Configure Bash login and.
Booting and boot levels
Week Eleven Agenda Announcements Open Source Presentation dates April 4 and 11 Lab Assignment 11-1 No script logic Link of the week Review week ten lab.
System Startup & Shutdown Objectives –to interpret the Unix startup and shutdown configuration files –to be able to create a customised run level Contents.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
1 Linux Basics for Networking. 2 Module - Linux Basics for Networking ♦ Overview This module focuses on the basics of networking using Redhat Enterprise.
Week Twelve Agenda Announcements Proctor faxes final exam before mailing Grade submission is December 23 Link of the week Review week eleven lab assignment.
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.
Week Eleven Agenda Announcements Sign up for the open source assignment Open Source Presentation dates December 9 and 16, Lab Assignment 11-1 Knoppix.
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.
ITI-481: Unix Administration Meeting 3. Today’s Agenda Hands-on exercises with booting and software installation. Account Management Basic Network Configuration.
Linux+ Guide to Linux Certification, Third Edition
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
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.
Week Eleven Agenda Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
Week Eleven Agenda Announcements Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming.
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.
Week Fourteen Agenda Announcements Final Exam 100 True/False questions, 95 answers graded. 100 Multiple Choice questions, 95 answers graded. 12 Essay.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
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.
Week Eleven Agenda Announcements March 25, class presentation? Open Source Presentation dates April 8 and 15. Lab Assignment 11-1 Knoppix File System.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
Core System Services. INIT Daemon The init process is the patron of all processes. first process that gets started in any Linux/ UNIX -based system.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
Linux+ Guide to Linux Certification, Third Edition
The Saigon CTT Chapter 10 Managing Users. The Saigon CTT  Objectives  Define the requirements for user accounts  Explain group and group accounts 
© 2006 ITT Educational Services Inc. Linux Operating System :: Unit 3 :: Slide 1 Downloading and Installing Software yum pirut Bit Torrent rmp.
ITI-481: Unix Administration Meeting 3 Christopher Uriarte, Instructor Rutgers University Center for Applied Computing Technologies.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
Agenda Administrative Issues Link of the Week This Week’s Expected Outcomes Points of interest Moving around in UNIX Break-Out Problems Upcoming Deadlines.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
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.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
CSC414 “Introduction to UNIX/ Linux” Lecture 3
Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
Week Eleven Agenda Announcements Open Source Presentation dates July 26 and August 2. Lab Assignment 11-1 Knoppix File System - No script logic Link of.
..\..\Local Settings\Temporary Internet Files\Content.IE5\WL2C8E1D\j [1].jpg.
System Administration Startup Process. Why Care? ● Every process on your system comes about by following a specific chain of events from the machine startup.
Week Eleven Agenda Announcements Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming.
The Linux Kernel About 6 million lines of code
LINUX SYSTEM ADMINISTRATION
\. \Local Settings\Temporary Internet Files\Content
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
Week Eleven Agenda Announcements Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming.
System Programming and administration CS 308
Chapter 11: Managing Users
\. \Local Settings\Temporary Internet Files\Content
Adding New Users, Storage, File System
LINUX SYSTEM ADMINISTRATION
Module 13 System and User Security
Presentation transcript:

Week Eleven Agenda Announcements Link of the week Review week ten lab assignment Week ten expected outcomes Next lab assignment Break-out problems Upcoming deadlines Lab assistance

Link of the week File System Define: File system Linux File System ext3 includes journaling capabilities to allow faster recovery after unexpected reboots.

Link of the week Define file system with journaling : A file system with journaling is based on the techniques used from real-time transaction processing. A transaction log is used to store transactions either in a designated file system location or on a separate disk partition. As changes are made to the file system, metadata changes are recorded to the log and writing entries to the log are done prior to writing the actual buffers to disk.

Link of the week Benefits of journaling In the event of a system crash, the entries in the log file remain intact and are replayed. Maintaining this level of data integrity ensures that the file system is in a constant state.

Review week ten lab assignment Definition: Network Protocol is a standard procedure and format that two data communication devices must understand, accept and use in order to be able to communicate with each other. A network protocol determines the following: The type of error checking to be performed. The data compression method to be used. How the sending device will indicate that it has finished sending a message. How the receiving device will indicate that it has received a message.

Review week ten lab assignment /etc/password file Location: /etc/passwd Field separators: Colon (:) File format: Username:Password:UID:GID:UserID:Home directory:Command/shell Example: dandrear:x:1020:1021:dandrear user:/export/home/dandrear:/bin/ksh Permissions on Einstein: -rw-r--r-- 1 root root 1636 Aug 16 10:37 /etc/passwd

Review week ten lab assignment /etc/passwd file  Username: It is used when user logs in. It should be between 1 and 32 characters in length.  Password: An x character indicates that encrypted password is stored in /etc/shadow file.  User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID are reserved by system for administrative and system accounts/groups.  Group ID (GID): The primary group ID (stored in /etc/group file)  User ID Info: The comment field. It allow you to add extra information about the users such as user’s full name, phone number etc. This field use by finger command.  Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes /  Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell. Please not it does not have to be a shell.

Review week ten lab assignment Example of /etc/passwd file root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt

Review week ten lab assignment /etc/passwd file The /etc/passwd file is considered the user database for the system. The information contained in the /etc/passwd file is useful for applications running on the system to access. In summary, the /etc/passwd file is located under the system configuration and executables directory. The /etc/passwd file is the system’s master list of information about user accounts.

Review week ten lab assignment /etc/shadow file Location: /etc/shadow Field separators: Colon (:) File format: username:passwd:lastpasswdch:min:max:warn:inactive:expire:unused Example: dandrear:$1$dhBysgdhfteM9gd00:13064:0:99999:7::: Permissions on Einstein: -r root root 1107 Sep 5 15:24 /etc/shadow (Permission denied)

Review week ten lab assignment / etc/shadow file  User name : It is your login name  Password: It your encrypted password. The password should be minimum 6-8 characters long including special characters/digits  Last password change (last changed): Days since Jan 1, 1970 that password was last changed  Minimum: The minimum number of days required between password changes i.e. the number of days left before the user is allowed to change his/her password  Maximum: The maximum number of days the password is valid (after that user is forced to change his/her password)  Warn : The number of days before password is to expire that user is warned that his/her password must be changed  Inactive : The number of days after password expires that account is disabled  Expire : days since Jan 1, 1970 that account is disabled i.e. an absolute date specifying when the login may no longer be used  Unused field:

Review week ten lab assignment /etc/shadow file The “X” in the /etc/passwd file password field indicates that the shadow file contains the encrypted password. Red Hat Linux uses MD5 by default. Most Linux systems utilize MD5 as their encrypted form. MD5 requires 34 characters in encryption form. MD5 always begins with $1$ The shadow file is only readable by root. In summary, the /etc/shadow file contains the encoded passwords and password settings. The /etc/shadow file contains all the guide lines that pertain to the administration of the password.

Review week ten lab assignment /etc/group file Location: /etc/group Field separators: Colon (:) File format: Group name:Password:GID:User_list Example: faculty:x:410: staff:x:430: Permissions on Einstein: -rw-r--r-- 1 root root 833 Aug 16 10:37 group

Review week ten lab assignment /etc/group file  Group name: Name of the group.  Password: The group password is encrypted. If this field is empty, no password is needed. Otherwise, an “X” in the field indicates the password is stored in the /etc/gshadow file.  GID: The numerical group ID and/or unique group identifier.  User_list: All the group member's user names, separated by commas. Most Unix-like systems impose a limit of 16 to 32 group memberships per user.

Review week ten lab assignment /etc/group file ntp:x:38 : student:x:101: itadmin:x:400: faculty:x:410: csfac:x:420:mccannp,sieberth,hochstew,whittakt,morganr,hart ung staff:x:430: hpsmh:x:501: kumarp:x:503: caldwelr:x:505: apache:x:48: oinstall:x:600: Linux utilizes the vigr command used to edit the /etc/group file.

Review week ten lab assignment /etc/group file In summary, the /etc/group file identifies a collection of users who generally share similar functions. These groupings are not limited to departments or project.

Review week ten lab assignment /etc/gshadow file  Group-name: is the name of the group  Password: is the encoded version of the password  Group-admins: is the list of members in the group  Additional- users: a copy of additional members. In summary, the /etc/gshadow file is utilized to store the /etc/group password.

Review week ten lab assignment File Summary /etc/passwd - user account information /etc/shadow - secure user password information /etc/group - group information /etc/gshadow - secure group password information User account files The /etc/passwd, /etc/shadow, and /etc/group files are considered the most important files for storing user account and authentication information. Command to add a user account Linux/Knoppix –useradd Command to remove a user account Knoppix – deluser Linux - userdel

Review week ten lab assignment Managing Users Adding a user to a computer involves several steps before the user can actually log in and perform user operations. Every user that intends to utilize a computer must first gain access to that system, then go through an initialization process found under the user’s home directory. The new user initialization process begins by reading and executing the commands and environmental variables found in the $HOME/.profile file. Normally, the.profile is run automatically when you log into the system and the user’s environment is set up silently. Once the user is granted access permission to the system, a shell is spawn to allow the user to interact with the system. Display the ~dandrear/.profile When adding a new user account to the system, the administrator assigns the username a user identification number (UID). The UID is used internally by the system to identify each user. Duplicating the UID causes the accounts to share an identity in the system.

Review week ten lab assignment Processes & symbol represents the background process. Once a background process is launched by a terminal session, the process becomes unattached to the terminal that launched it. Background processes are terminated with PID=n and typing kill -9 PID Example: simple_script & Once a foreground process is started, it remains in the foreground until it completes, because it remains attached to the terminal. Foreground process by typing Ctl-C or Ctl-Z

Review week ten lab assignment An autonomous process is one that is not started by the kernel. The daemon processes are started as part of the boot process and run until the system is shut down. The UNIX inetd daemon may start the telnetd to handle a telnet connection. The UNIX inetd daemon may start the ftpd to handle an ftp connection. One daemon may start another; the UNIX inetd daemon will accept a network connection and then start another daemon to handle the connection, based on the type of connection. There are various processes in UNIX that are not owned by a user, but exist to provide services. These processes are often called "daemons.“ The inetd superserver runs continuously listening for network connections. This type of daemon is more susceptible to be system breaches.

Review week ten lab assignment xinetd daemon The Linus xinetd daemon is a more secure replacement for the inetd superserver. The xinetd superserver listens for network connections. When a connection is made, it launches a specific daemon and forwards the data from the socket to the daemon’s standard input. Basically, the xinetd superserver works on demand.

Review week ten lab assignment Single threaded process is when a process only performs one task. Multi-threaded process is when a process can perform multiple tasks concurrently without extra overhead needed to create a new process. Word processor is a multi-threaded process.

Review week ten lab assignment The kernel is responsible for creating the init process. This creation is referred to as spontaneous and/or hand-crafted. Processes go through various process states during their existence. These are transitory states managed by the operating system (OS). The specifics of these process states vary from one OS to another, as well as state names. Linux Process states: - Waiting (process scheduler - load from secondary storage to main memory) - Running (after a process is assigned a processor by a short - term scheduler, context switch is performed) - Stopped (The process has been stopped, usually by receiving a signal. A process that is being debugged can be in a stopped state) - Zombie (This is a halted process for some reason. Still has a task_struct data structure)

Review week ten lab assignment

Zombie process is a process that has completed execution but still has an entry in the process table, allowing the process that started it to read its exit status. Locate a zombie process on cs.franklin.edu Orphan process is a process whose parent process has terminated or finished.

Review week ten lab assignment /etc/rc.d/rc.sysinit This init script performs basic system configuration which includes setting the system clock, hostname, and keyboard mapping; setting up the swap partitions; checking the remaining file system for errors; and turning on the quota management. /etc/rc.d/rc This init script runs the scripts for the services that need to be started when you first bring the system up and that need to be started or stopped when the system foes from single user mode to multiuser mode and back down again.

Review week ten lab assignment /etc/rc.d/init.d This init directory contains shell rc scripts and run via symbolic links in the /etc/rc.d/rcn.d directories, where n is the runlevel the system is entering. The following scripts reside in this directory. /etc/rc.d/rc.local This file is executed after the init scripts. Commands can be placed in this file to customize the system. These commands are best suited to execute in the background and after the initialization process completes.

Review week ten lab assignment /etc/rc.d/rc1.d This directory contains scripts the start and stop during a specific run level. The following scripts execute during run level one (1): K10cups K25sshd K50netdump K74nscd K86nfslock K91isdn S01sysstat Notice the numbering from 00 to 99. This numbering provides positioning of a script within the whole scheme of execution.

Week ten, eleven, & twelve expected outcomes Upon successful completion of this module, the student will be able to: Manipulate user accounts. Describe how cron is used to invoke repetitive processes. Manipulate process structure including: a) fork and execute b) Initialization process c) Background/foreground d) PS tool Explain basic UNIX security issues. Describe disk and file system structure. Use backup and restore archival operations on a system. Establish network services. Investigate the structure of the LDAP directory using LDAP commands.

Next Lab Assignment HTML (Hyper Text Markup Language) is a language used to create documents and the World Wide Web. HTML defines the structure and layout of a Web document by using a variety of tags and attributes. The correct structure for an HTML document starts with (enter here what document is about) and ends with. All the information you'd like to include in your Web page fits in between the and tags. Define: Common Gateway Interface (CGI) It is a standard used for interfacing between applications with information servers (Web server). Application: CGI scripts execute in real-time and their output is dynamic in content. Scripts are designed to be executed from a Web daemon that will transmit information to another software facilitator (database engine), and receive the results back again and display them to the client.

Next Lab Assignment fork command Is a command that causes the shell to fork a new process, creating a duplicate of the shell process (subshell). exec command The new process attempts to exec the command. If the command is a binary executable program, like a compiled C program, exec succeeds and the system overlays the newly created sub-shell with the executable program. Both commands are system calls that are executed by the operating system.

Next lab assignment /etc/inittab describes which processes are started at boot-up and during normal operation. The /etc/inittab format: id:runlevels:action:process # System initialization. 10:0:wait:/etc/rc.d/rc 0 11:1:wait:/etc/rc.d/rc 1 12:2:wait:/etc/rc.d/rc 2 13:3:wait:/etc/rc.d/rc 3 14:4:wait:/etc/rc.d/rc 4 15:5:wait:/etc/rc.d/rc 5 16:6:wait:/etc/rc.d/rc 6 # Run mingetty in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3

Next lab assignment The runlevel field may be a single value for a process. # /etc/inittab run levels 0,1, 2, 3, 4, 5, and 6 l:0:wait:/etc/rc0.d 2:1:wait:/etc/rc1.d 3:2:wait:/etc/rc2.d 4:3:wait:/etc/rc3.d 5:4:wait:/etc/rc4.d 6:5:wait:/etc/rc5.d 7:6:wait:/etc/rc6.d

Next lab assignment The runlevel field may contain multiple runlevels for a process. # /etc/inittab run levels 2, and 3 1:23:respawn:/sbin/mingety tty1 2:23:respawn:/sbin/mingety tty2 3:23:respawn:/sbin/mingety tty3 4:23:respawn:/sbin/mingety tty4 5:23:respawn:/sbin/mingety tty5 6:23:respawn:/sbin/mingety tty6

Next lab assignment /etc/inittab format id:runlevel:action:process - id is a unique sequence of 1-4 characters which identify an entry in /etc/inittab - runlevel is a specific process level that action should be taken - action describes which action should be performed - process specifies which process to be executed.

Next lab assignment respawn – The process will be restarted whenever it terminates. wait – The process will be started once when the specific runlevel is entered and init will wait for its termination. once – The process will be executed once when the specific runlevel is entered. boot – The process will be executed during system initialization. initdefault – This entry specifies the runlevel which should be entered after system boot. sysinit – The process will be executed during system boot. It will be executed before any boot or boot wait entries.

Next lab assignment powerwait – The process will be executed when the power goes down. powerokwait – This process will be executed as soon as init process is informed that the power has been restored. powerfailnow – This process will be executed when the init process is informed that the battery of the external UPS power is failing. ctraltdel – The process is executed when the init process receives the SIGINT signal. This means that someone on the system console has pressed the Ctrl-Alt-Del key combination.

Next lab assignment /etc/init.d/rc.d/crond is started automatically started when entering multi-user runlevel. crond is a daemon that executes scheduled commands. /etc/crontab file is a file which contains the schedule of entries to be run and at specified times. # Einstein /etc/crontab entries 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly * * root run-parts /etc/cron.monthly

Next lab assignment crontab format * * * * * command to be executed First *: min (0-59) Second *: hour (0-23) Third *: day of month (1-31) Fourth *: month (1-12) Fifth *: day of week (0-6) (Sunday=0) Example: * * * rm /export/home/someuser/*

Next lab assignment /usr/lib/cron/cron.allow /usr/lib/cron/cron.deny crontab commands crontab -eEdit crontab file crontab –lDisplay your crontab file crontab –rRemove your crontab file crontab –vDisplay last time crontab was edited.

Break-out problems 1)What is an incremental back up? 2)What is a full back up? 3)List the different process states used on a Linux system. 4)Explain the relationship between the /etc/passwd file and the /etc/shadow file. 5)What functionality does journaling provide a file system? 6)Describe how a background process works with respect to the terminal. 7)Describe how a foreground process works with respect to the terminal. 8)Syntax used in the /etc/inittab file respawn wait ctrlaltdel powerwait initdefault 9) Unix commands: uptime uname –n uname –a uname –r

Reading assignments Outline reading assignments Review Modules 4,5,6, and 7.

Upcoming deadlines Account/LDAP Script, 10-1 is due 3/22/09. Process, 10-2 is due 3/22/09. Programming Assignment 2, 12-1 is due 4/5/09. Archives Exercise, 12-2 is due 4/5/09. Programming Assignment 3, 14-1 is due 4/18/09. Presentations for Public Domain/Open Source Lab Assignment 13-1 will be 4/6 and 4/13. Final Exam, 15-1 will be administered 4/13 through 4/18. Final Exam Outline will be posted on the Bulletin Board 3/29/09, two weeks prior to the final exam date. This outline will be considered a “living” document. I will add additional information to it up to one week prior to the exam. All additional information posted after the initial posting will be highlighted/indicated.

Lab assistance Questions Comments Concerns I will be available after this Franklin Live session to discuss any problems and/or concerns regarding lab assignments.