% CST8207 Week 11 Notes - system logs, syslog, scheduling with crontab, at % Ian! D. Allen - idallen@idallen.ca - www.idallen.com % Winter 2013 - January to April 2013 - Updated Wed May 8 21:01:24 EDT 2013 Readings, Assignments, Labs, and ToDo ===================================== - Fill in your [Course Evaluation Survey] for this course. Only nine questions! Closes April 14. - Read (at least) these things (All The Words): - [Week 11 Notes HTML] - this file - ** Read All The Words ** - [Unix/Linux system logging, log files, kernel messages] - [Delayed and Repeated Scheduled Execution - at, cron, and crontab] - [Users and Groups - /etc/passwd, /etc/group, su, sudo, chsh, useradd, gpasswd, etc.] - [List of Commands] - From “Unix for Mac OS X Users” at [lynda.com] - more to come - Read (All The Words), Do, and save (not for hand in) - Fedora 12 Installation in VMware: [Lab Worksheet #07 PDF] - [Installing and Configuring VMware Tools for Fedora 12] - [CST8207 Frequently Asked Questions] - Have your instructor check you off on the installation using the five points on the last page of the worksheet. - [Lab Worksheet #08 PDF] - chmod, umask, permissions - [Lab Worksheet #11 PDF] - user and group management - Read (All The Words), Do, and then Submit via Blackboard: - optional BONUS VIM assignment: [Assignment #06 HTML] (optional) - optional BONUS Midterm#2 assignment: [Assignment #09 HTML] (optional) - [Assignment #10 HTML] - processes, syslog, crontab, at, Fedora 12 - [Assignment #11 HTML] - user and group management (Megadeth Project) - Write down the dates of your Final Exams from the [Course Home Page]. From the Class Notes link on the Course Home Page ================================================= - Review last week. Did you do everything assigned last week? - Do your Fedora 12 install using [Lab Worksheet #07 PDF] - Review midterm test results from last week in [Week 10 Notes HTML]. - review minimal permissions from [Lab Worksheet #08 HTML] - [Unix/Linux Command Reference] From the Classroom Whiteboard/Chalkboard ======================================== - Your in-class notes go here. - Fill in your [Course Evaluation Survey] for this course. Only nine questions! Closes April 14. - Sun Mar 24: Expected 90 responses, received 49 `54%` - Read [Last Term’s Course Evaluations] - Reading [man page SYNOPSIS lines] - pay strict attention to the order of the words - Command options that take following values cannot be split - e.g. `head -n 10`, `find -name foo`, or `usermod -d /home/newdir` - you cannot insert other options *between* an option and its following value. These are *WRONG:* - **WRONG:** `head -n -v 10` - **WRONG:** `find -name -L foo` - **WRONG:** `usermod -d -m /home/newdir ...` Some Commands ============= Keep a notebook with a [List of Commands] in it. Real Sysadmin Work ================== Senior sysadmin one-line solution: find dir -type f -printf '%i\n' | xargs -L 1 -I'{}' find . -inum '{}' -delete Finding things that are not symbolic links that have *other* write permissions: find dir ! -type l -perm /o+w -ls Linux takes over China ---------------------- - - The British Linux company Canonical is teaming with the Chinese Ministry of Industry and Information Technology to create Ubuntu Kylin, a Linux distribution specifically for China. Attacks on my home machine -------------------------- ns230365.ovh.net - - [20/Mar/2013:13:42:01 -0400] "GET //index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:42:01 -0400] "GET /cst8207/13w/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:42:06 -0400] "GET /cst8207/12f/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:42:23 -0400] "GET //index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:42:23 -0400] "GET /cst8207/13w/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:42:27 -0400] "GET /cst8207/12f/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:42:53 -0400] "GET //index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:42:53 -0400] "GET /cst8207/13w/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:43:40 -0400] "GET /cst8207/12f/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:13:50:46 -0400] "GET /cst8129/02f/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:15:40:12 -0400] "GET //index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" ns230365.ovh.net - - [20/Mar/2013:15:40:12 -0400] "GET /cst8207/12f/notes//index.php?route=../../../../../../../../../../../../../../../../../../../../../../../..//proc/self/environ%0000 HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [Course Evaluation Survey]: https://coursefeedback.algonquincollege.com/etw/ets/et.asp?nxappid=WCQ&nxmid=start [Unix/Linux system logging, log files, kernel messages]: 580_system_log_files.html [Delayed and Repeated Scheduled Execution - at, cron, and crontab]: 630_crontab_at_job_scheduler.html [Users and Groups - /etc/passwd, /etc/group, su, sudo, chsh, useradd, gpasswd, etc.]: 700_users_and_groups.html [List of Commands]: 900_unix_command_list.html [lynda.com]: https://lyceum.algonquincollege.com/Lynda [Lab Worksheet #07 PDF]: worksheet07.pdf [Installing and Configuring VMware Tools for Fedora 12]: 009_vmware_tools.html [CST8207 Frequently Asked Questions]: 007_freqently_asked_questions.html [Lab Worksheet #08 PDF]: worksheet08.pdf [Lab Worksheet #11 PDF]: worksheet11.pdf [Lab Worksheet #08 HTML]: worksheet08.html [Unix/Linux Command Reference]: http://files.fosswire.com/2007/08/fwunixref.pdf [Last Term’s Course Evaluations]: ../../12f/course_evaluation.html [man page SYNOPSIS lines]: 140_man_page_RTFM.html [Plain Text]: week11notes.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/