% CST8207 Week 02 Notes – passwords, man pages, shell command line, and pathnames % Ian! D. Allen – – [www.idallen.com] % Fall 2014 - September to December 2014 - Updated Wed Sep 24 15:19:12 EDT 2014 Readings, Assignments, Labs, and ToDo ===================================== - Read (at least) these things (All The Words): - [Week 02 Notes HTML] – this file – **Read All The Words** - [Guidelines for strong passwords] - [The Unix/Linux Shell] – using the shell command line in Linux - [Command Arguments and Options] - [Finding Help in Manual Pages – RTFM] - [Unix/Linux File System and Pathnames (ROOT, absolute, relative, dot, dot dot] - [List of Commands You Should Know] - Using your [lynda.com] account, watch [Unix for Mac OS X Users] - **1. Intro to Unix** - Command structure 5m 22s - command names, options, and arguments - Kernels and shells 5m 25s - the O/S core vs. the shell programs that read your command line - Unix manual pages 4m 6s - `man` - how to get help on every Unix/Linux command name - some say this is “the most valuable movie”, “your best friend” - **2. Filesystem Basics** - The working directory 2m 49s - `pwd` - Listing files and directories 3m 59s - `pwd`, `ls`, hidden files - Moving around the filesystem 4m 58s - `cd`, TAB filename completion, absolute/relative paths - Filesystem organization 4m 12s - ROOT, standard Unix folders - **3. Working with Files and Directories** - Naming files 5m 41s - Unix is case-sensitive, OSX is case-insensitive! - avoid special characters or blanks in Unix pathnames Assignments and Lab work this week ---------------------------------- Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant. - Read All The Words, Do, and then Submit via Blackboard: - [Assignment #01 HTML] – Multi-tasking and Homework - Coming Soon: Assignment #02 HTML – simple file system commands on the CLS - Really do **Read All The Words**. You don’t get a second chance to get it right. ### Worksheets The worksheets are available in four formats: Open Office (ODT), PDF, HTML, and Text. Only the Open Office format allows you “fill in the blanks” in the worksheet. The PDF format looks good but doesn’t allow you to type into the blanks in the worksheet. The HTML format is crude but useful for quick for viewing online. Do **NOT** open the ODT files using any Microsoft products; they will mangle the format and mis-number the questions. Use the free Libre Office or Open Office programs to open these ODT documents. On campus, you can [download Libre Office here]. - [Worksheet #02 ODT] – Using standard Linux commands - [Worksheet #02 PDF] – Using standard Linux commands - [Worksheet #02 HTML] – Using standard Linux commands - `PS1, cd, find, less, ls, man, mkdir, passwd, pwd, rmdir` - [Worksheet #03 ODT] – Using standard Linux commands - [Worksheet #03 PDF] – Using standard Linux commands - [Worksheet #03 HTML] – Using standard Linux commands - `cat, clear, cp, find, grep, history, less, man, mv, rm, sleep, touch` Errors in submitted `assignment01.txt` -------------------------------------- To date, 97/98 students used the correct file name. One did not: xxxxxxxx: Bad file name: Assigment 01.txt Be careful about hidden Windows file extensions that cause file names similar to this: Bad file name: assignment01.txt.txt Turn on “show extensions” in your Windows host computer, to avoid this problem. **Go to your assignment upload area and check your file name!** 17 students did not use the exact paragraph numbering system given in the assignment. Be precise! From the Class Notes link on the Course Home Page ================================================= - Review last week. Did you do everything assigned last week? From the Classroom Whiteboard/Chalkboard ======================================== - **Take notes in class!** Your in-class notes would go here. - This week, we learn about using pathnames, especially relative pathnames. Midterm Test Dates ------------------ - Test 1: 45 minutes, in your lecture class, Friday October 3 (end of week 5). - Test 2: 45 minutes, in your lecture class, Friday October 31 (end of week 9). Tests take place in your lecture hour, not in your lab period. Make sure you attend your correct lecture hour that day. Getting locked out of the server -------------------------------- Your IP address is locked out of the CLS if the connection to the CLS fails before even asking for your login or password. To have the IP address unblocked, [contact your instructor]. Real Sysadmin Work ================== Net Neutrality -------------- - USA threats to the level network playing field: - Canada’s Steve Anderson interviewed: - includes the John Oliver video on “Preventing Cable Company F***ery”. - Slides found by Kyle: Linux News ---------- - [City of Turin drops Windows for Linux] - [Learning to be a Linux Sysadmin] Attacks on the Course Linux Server ---------------------------------- - Dilbert: Being Attacked People in China and California try to log in as `root` on the CLS: Sep 9 22:58:31 Failed password for root from 117.79.148.54 port 43791 ssh2 Sep 10 13:30:16 refused connect from 117.79.148.54 117.79.148.54) $ whois 117.79.148.54 descr: Beijing Sanxin Shidai Co.Ltd descr: 1513 Xinjishu building Beijing link west road descr: Haidian District, Beijing, PRC country: CN Sep 10 01:37:34 Failed password for root from 198.13.117.194 port 46897 ssh2 Sep 10 01:37:35 refused connect from 198.13.117.194 (198.13.117.194) $ whois 198.13.117.194 OrgName: Psychz Networks OrgId: PS-184 Address: 20687-2 Amar Road #312 City: Walnut StateProv: CA Sep 11 04:56:15 Failed password for root from 59.55.141.104 port 2396 ssh2 Sep 11 04:56:26 Failed password for root from 59.55.141.104 port 2766 ssh2 Sep 11 04:56:33 refused connect from 59.55.141.104 (59.55.141.104) $ whois 59.55.141.104 descr: CHINANET Jiangxi province network descr: China Telecom descr: No.31,jingrong street descr: Beijing 100032 country: CN Someone in Ohio tries probing account names: Sep 10 10:05:17 Invalid user aditza from 66.84.25.6 Sep 10 10:05:18 Failed password for invalid user aditza from 66.84.25.66 port 55317 ssh2 Sep 10 10:05:19 Invalid user admin1 from 66.84.25.6 Sep 10 10:05:21 Failed password for invalid user admin1 from 66.84.25.66 port 56315 ssh2 Sep 10 10:05:22 Invalid user admin from 66.84.25.66 Sep 10 10:05:24 Failed password for invalid user admin from 66.84.25.66 port 57605 ssh2 Sep 10 10:05:25 Invalid user admin from 66.84.25.66 Sep 10 10:05:27 Failed password for invalid user admin from 66.84.25.66 port 58969 ssh2 Sep 10 10:05:27 Invalid user ale from 66.84.25.66 Sep 10 10:05:30 Failed password for invalid user ale from 66.84.25.66 port 59986 ssh2 Sep 10 10:05:30 Invalid user alex from 66.84.25.66 Sep 10 10:05:33 Failed password for invalid user alex from 66.84.25.66 port 33066 ssh2 Sep 10 10:05:33 Invalid user alex from 66.84.25.66 Sep 10 10:05:35 Failed password for invalid user alex from 66.84.25.66 port 34321 ssh2 Sep 10 10:05:36 Invalid user Alin from 66.84.25.66 Sep 10 10:05:37 Failed password for invalid user Alin from 66.84.25.66 port 35553 ssh2 Sep 10 10:05:38 refused connect from s66.n25.n84.n66.static.myhostcenter.com (66.84.25.66) $ whois 66.84.25.6 OrgName: Jumpline Inc Address: 5000 ARLINGTON CENTRE BLVD City: Upper Arlington StateProv: OH Attackers in China probe account names: Sep 10 15:57:21 Failed password for root from 221.6.96.177 port 56455 ssh2 Sep 10 15:57:26 Failed password for root from 221.6.96.177 port 57756 ssh2 Sep 10 15:57:31 Failed password for root from 221.6.96.177 port 59015 ssh2 Sep 10 15:57:35 Failed password for invalid user db2inst1 from 221.6.96.177 port 60362 ssh2 Sep 10 15:57:39 Failed password for root from 221.6.96.177 port 33334 ssh2 Sep 10 15:57:44 Failed password for invalid user prueba from 221.6.96.177 port 34543 ssh2 Sep 10 15:57:48 Failed password for bin from 221.6.96.177 port 35865 ssh2 Sep 10 15:57:49 refused connect from ns3.itgle.com (221.6.96.177) $ whois 221.6.96.177 address: No. 65 Beijing West Road,Nanjing,China Sep 11 02:26:39 Failed password for root from 202.104.147.26 port 28629 ssh2 Sep 11 02:27:02 Failed password for root from 202.104.147.26 port 21095 ssh2 Sep 11 02:27:05 Failed password for root from 202.104.147.26 port 21095 ssh2 Sep 11 02:27:07 Failed password for root from 202.104.147.26 port 21095 ssh2 Sep 11 02:27:24 Failed password for root from 202.104.147.26 port 22920 ssh2 Sep 11 02:27:36 refused connect from 202.104.147.26 (202.104.147.26) Sep 11 02:27:47 refused connect from 202.104.147.26 (202.104.147.26) Sep 11 02:27:59 refused connect from 202.104.147.26 (202.104.147.26) $ whois 202.104.147.26 person: LI XINKAIG address: F9,HONGBO MANSION,HONGHUYI STREET,SHENZHEN country: CN Someone in California probes account names: Sep 10 23:57:41 Failed password for root from 216.99.159.114 port 53777 ssh2 Sep 10 23:57:44 Failed password for invalid user app from 216.99.159.114 port 54881 ssh2 Sep 10 23:57:46 Failed password for invalid user avouni from 216.99.159.114 port 55935 ssh2 Sep 10 23:57:49 Failed password for invalid user berila from 216.99.159.114 port 56930 ssh2 Sep 10 23:57:52 Failed password for bin from 216.99.159.114 port 58210 ssh2 Sep 10 23:57:55 Failed password for bin from 216.99.159.114 port 59461 ssh2 Sep 10 23:57:58 Failed password for bin from 216.99.159.114 port 60597 ssh2 Sep 10 23:58:02 Failed password for bin from 216.99.159.114 port 61815 ssh2 Sep 10 23:58:05 Failed password for bin from 216.99.159.114 port 63057 ssh2 Sep 10 23:58:07 Failed password for bin from 216.99.159.114 port 64347 ssh2 Sep 10 23:58:11 Failed password for bin from 216.99.159.114 port 40226 ssh2 Sep 10 23:58:11 refused connect from 216.99.159.114 (216.99.159.114) $ whois 216.99.159.114 OrgName: Psychz Networks Address: 20687-2 Amar Road #312 City: Walnut StateProv: CA  ![Take Notes in Class] -- | 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 [www.idallen.com]: http://www.idallen.com/ [Guidelines for strong passwords]: http://en.wikipedia.org/wiki/Password_strength#Guidelines_for_strong_passwords [The Unix/Linux Shell]: 120_shell_basics.html [Command Arguments and Options]: 150_arguments_and_options.html [Finding Help in Manual Pages – RTFM]: 140_man_page_RTFM.html [Unix/Linux File System and Pathnames (ROOT, absolute, relative, dot, dot dot]: 160_pathnames.html [List of Commands You Should Know]: 900_unix_command_list.html [lynda.com]: http://algonquincollege.com/onlineresources/mobileStudent/lynda.htm [Unix for Mac OS X Users]: http://www.lynda.com/Mac-OS-X-10-6-tutorials/Unix-for-Mac-OS-X-Users/78546-2.html [download Libre Office here]: 050_course_introduction.html#install-libreoffice-or-openoffice-into-windows [Worksheet #02 ODT]: worksheet02.odt [Worksheet #02 PDF]: worksheet02.pdf [Worksheet #02 HTML]: worksheet02.html [Worksheet #03 ODT]: worksheet03.odt [Worksheet #03 PDF]: worksheet03.pdf [Worksheet #03 HTML]: worksheet03.html [contact your instructor]: 070_course_linux_server.html#getting-locked-out-of-the-server [City of Turin drops Windows for Linux]: http://www.zdnet.com/city-of-turin-decides-to-ditch-windows-xp-for-ubuntu-and-6m-saving-7000033482/ [Learning to be a Linux Sysadmin]: http://archive.oreilly.com/pub/post/linux_system_administration_th.html [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Plain Text]: week02notes.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/