% CST8207 Week 12 Notes - Users and Groups and Permissions % Ian! D. Allen - - [www.idallen.com] % Fall 2013 - September to December 2013 - Updated Fri Nov 22 06:40:50 EST 2013 Readings, Assignments, Labs, and ToDo ===================================== - Read (at least) these things (All The Words): - [Week 12 Notes HTML] - this file - **Read All The Words** - [Users and Groups - /etc/passwd, /etc/group, su, sudo, chsh, useradd, gpasswd, etc.] - [Unix/Linux Partitions and File Systems - fdisk, mkfs, mount, swap] - [List of Commands You Should Know] - Using your [lynda.com] account, watch [Unix for Mac OS X Users] - **4. Ownership and Permissions 34m 58s** - The root user 1m 57s - sudo and sudoers 5m 20s Assignments 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 #09 HTML] – [Permissions], [Umask] - [Assignment #11 HTML] – [Processes and Jobs], [System Log Files], [Crontab and At], [Minimal Permissions] - [Assignment #07 HTML] – installing and configuring CentOS in a VM, using [CentOS Installation and Configuration] and [CentOS VMware Tools Installation] - [Assignment #12 HTML] – work with [Users and Groups][Users and Groups - /etc/passwd, /etc/group, su, sudo, chsh, useradd, gpasswd, etc.] (Simpsons, StarWars, and the Megadeth Project) - You must have a working CentOS installed for Assignments 12 and 13. Lab work this week ------------------ - [CentOS Installation and Configuration] - [Assignment #07 HTML] will verify this installation. - [CentOS VMware Tools Installation] - [Assignment #07 HTML] will verify this installation. - [Worksheet #08 HTML][Minimal Permissions] – permissions, mode, `chmod`, `umask` - minimum permissions needed for basic file operations (needed for [Assignment #11 HTML]) Final Exam – Wednesday December 11 15h30 (3:30pm to 6:30pm) =========================================================== - Your Final Exam schedule is posted in the ICT office. The Final Exam is closed-book, no aids, no devices. - Your Final Exam covers the entire course, with slight emphasis on material since the second midterm test, and on material that students did not answer well in the previous two tests. - Your Final Exam includes questions from **all** practice tests, not just the most recent ones. - For full marks, you must read and understand the [Test Instructions] before the test for important directions on how to enter your answers and the test version number on the mark-sense forms. - There may be more questions on the test than you can answer in the time allowed; answer the ones you know, first. - Practice tests are available for the Final Exam. - Read the [Practice Test README Information]. - See the [Practice Tests] and answer files. - The same questions are posted as **Quizzes** on Blackboard. The Quizzes are random samples from the above practice questions, and so they often repeat questions. - If you only want to do each practice question *once*, use the practice test PDF files, not the Quizzes that repeat questions at random (and may not show you all the possible questions). 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 ======================================== - Your in-class notes go here. - Data mining: Which users have the most `Failed password` attempts? - HINT: Look in the system authorization log file and use the examples of [Pipes] to extract and count the userids. - Answer given in class Monday November 18 – see your class notes. - Basic EMail etiquette: - Make the **Subject:** match the message. - Don’t quote irrelevant crap in replies; remove the junk. - [Don’t top-post] unless forwarding. - Use an [SMS Gateway List] to find the email address of your SMS enabled phone, and email a test message directly to your phone. (May be subject to length restrictions and incur an arbitrary delay.) - To find your phone gateway, try - Pay attention to how permissions work with `sudo` and shell redirection! See the notes on redirection in [Users and Groups] - `$ sudo touch foo >bar` - `$ sudo cp /etc/shadow foo` - `$ sudo cat /etc/shadow >bar` - The `userdel` command does not delete HOME directories (unless you use the `-r` option). What does `ls` show for a file’s user and group if that user and group have been deleted from the system? See `userdel` in [Users and Groups][1] # useradd redshirt # id redshirt uid=508(redshirt) gid=509(redshirt) groups=509(redshirt) # ls -ld /home/redshirt drwx------ 2 redshirt redshirt 4096 Nov 20 02:38 /home/redshirt # userdel redshirt # id redshirt id: redshirt: No such user # ls -la /home/redshirt [... what does ls show now? ...] - The College tells me you must watch video this during Global Entrepreunership Week: - Click here when you’ve watched it: - Results: - Fill our your [Course Evaluation] ![awk grep sed pwd] Real Sysadmin Work ================== - [How to fix any computer] - Joke (from a Linux student): > Subject: joke, clean\ > Why didn’t the chicken cross the road?\ > Because he did not have an absolute path and could’t find his way.\ > HAHAHAHAHA! Linux/Unix Jobs --------------- From Michael Anderson: Take Notes In Class! -------------------- ![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/ [Users and Groups - /etc/passwd, /etc/group, su, sudo, chsh, useradd, gpasswd, etc.]: 700_users_and_groups.html [Unix/Linux Partitions and File Systems - fdisk, mkfs, mount, swap]: 720_partitions_and_file_systems.html [List of Commands You Should Know]: 900_unix_command_list.html [lynda.com]: https://lyceum.algonquincollege.com/Lynda [Unix for Mac OS X Users]: http://wwwlyndacom.rap.ocls.ca/Mac-OS-X-10-6-tutorials/Unix-for-Mac-OS-X-Users/78546-2.html [Permissions]: 500_permissions.html [Umask]: 510_umask.html [Processes and Jobs]: 600_processes_and_jobs.html [System Log Files]: 580_system_log_files.html [Crontab and At]: 630_crontab_at_job_scheduler.html [Minimal Permissions]: worksheet08.html [CentOS Installation and Configuration]: 000_centos_install.html [CentOS VMware Tools Installation]: 000_centos_vmware_tools.html [Test Instructions]: 000_test_instructions.html [Practice Test README Information]: PRACTICE_TEST_README.html [Practice Tests]: indexcgi.cgi#XQuizzes__Tests__and_Exams [Pipes]: 200_redirection.html#examples-of-pipes [Don’t top-post]: http://idallen.com/topposting.html [SMS Gateway List]: http://en.wikipedia.org/wiki/List_of_SMS_gateways [Users and Groups]: 700_users_and_groups.html#sudo-doesnt-affect-shell-redirection [1]: 700_users_and_groups.html#userdel-delete-user [Course Evaluation]: https://coursefeedback.algonquincollege.com/etw/ets/et.asp?nxappid=WCQ&nxmid=start&s=8 [awk grep sed pwd]: data/awkgrepsedpwd.gif "awk grep sed pwd" [How to fix any computer]: http://theoatmeal.com/blog/fix_computer [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Plain Text]: week12notes.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/