Changes

Jump to: navigation, search

SRT210 Lab 1

1,078 bytes removed, 04:31, 2 July 2019
Resetting the root password
* The course is made primarily of labs. It will contain traditional instruction but only enough to get you started. Use the rest of the time to practice what you're supposed to be learning and ask questions when you get stuck or when something doesn't make sense.
* We'll typically have one weak week for each lab. The lab is due in class, and needs to be checked by the professor before class is over. That means you should plan to have everything done by the middle of the class.
* Make the best out of your labbook. Not only is it a record of your progress (and your marks for the labs) but it's a large set of notes you'll be able to use at all the assessments.
* Everything in the labbook must be hand-written (by you) and every page must have your name on it. If I catch you using someone else's notes during an assessment - that will be treated as plagiarism.
== Overview ==
You'll use the Vmware VMware on our lab machines as a hypervisor for your host. Typically you have one hypervisor running a bunch of VMs, but for securitty reasons in our lab environment we'll need to use nested virtualisation.
That means the VMware hypervisor will run on the real hardware (the lab machine) and we'll set up a second hypervisor in one VMware VM, which will host several other VMs.
* The network should be connected on boot, as a dhcp client for now.
* Set the root password to something different from your regular user password.
* Create a regular user with the same username as your matrix (MySeneca) username. Set the password to anything you like, as long as it's different from the root password.
Once the installation is complete your andrewVMhost virtual machine should boot into CentOS when it's powered on, you should be able to log in with your username, and browse the internet using Firefox.
** shell
** hashed password
* Replace the hashed password field for the root user with nothing.After editing the line for <code>root</code> should look like this:<code>root:::::::</code>
* Reboot into CentOS and try to log in.
 
{{Admon/important|SELinux|Depending on how you edited your file: at this point you may not be able to log in as any user with any password. The root password has been removed but SELinux is "securing" your system and will not allow the login process to read the shadow file, therefore you can't log in. We'll need to fix this.}}
 
* Reboot your VM and at the boot prompt press <code>e</code> (for Edit).
* Scroll down to the line that starts with <code>linux16</code>. These are the parameters passed to the kernel when it's started.
* At the end of that line add <code>enforcing=0</code>
* Press <code>Ctrl-x</code> to boot the system.
* Now you should be able to log in, and you'll get a message about some SELinux problems.
* One of those messages will suggest that you run <code>restorecon -v /etc/shadow</code>. Do that as root (notice you don't need to type in a root password any more).
* Now you can disconnect your DVD drive, reboot, and log in normally.
 
SELinux added steps to the process, but it's nothing more than a distraction. At the end of the day - you should have figured out that as long as you control the disk image, you have full control over its contents.
=== The same using CentOS ISO ===

Navigation menu