CTEC1863/2018F Bonus Lab Page 1 of 5 Bonus Lab: OpenSUSE Linux Rescue In this lab, we will install an OpenSUSE virtual machine. However, both the non-root user and the root passwords are unknown. To fix it, we will use an OpenSUSE Rescue LiveCD to "pick the lock." You can do this lab in place of Lab 10 or as a true bonus lab. Maximum final grade in CTEC1863 is 100. Procedure 1. Download both the OpenSUSE Virtual Appliance (.ova) image and the OpenSUSE Rescue LiveCD (.iso) image from the course web site. 2. Import the Virtual Appliance. In L17, it is recommended that you place the virtual hard disk file on the SSD (F: drive) and set a new MAC address...
CTEC1863/2018F Bonus Lab Page 2 of 5 3. Change the Network Settings to use a Bridged network: 4. Add the Live CD image as the Primary Master IDE optical drive: 5. Start the VM. The Live CD should boot.
CTEC1863/2018F Bonus Lab Page 3 of 5 6. From the Desktop, mount the hard disk by double-clicking on the icon ("41 GB Volu..."). From the Terminal window (open one if necessary), become root and find out where the system mounted the hard disk. Make a note of the mount point. 7. (a) Add a User1 user with the useradd command. (b) (c) (d) (e) (f) Change the password for User1 with the passwd command. Make a note of the password. Change the root password with the passwd command. Make a note of this password, too. The above changes were recorded to /etc/passwd and /etc/shadow (which are stored in RAM when using a Live CD.) We are interested only in the encrypted passwords in /etc/shadow. The shadow file we want to fix is in the etc directory of the hard disk mount point. Change to that etc directory. (Hint: use the mount command to find out the mount point.) Copy your new passwords to the hard disk's shadow file: grep root /etc/shadow >> shadow grep User1 /etc/shadow >> shadow
CTEC1863/2018F Bonus Lab Page 4 of 5 8. Edit the updated shadow file using the nano editor. Remove the old (unknown) password lines by moving to them with the down arrow key and by pressing [Ctrl-K]. Save the file with [Ctrl-O]; exit nano with [Ctrl-X]. 9. Close the Terminal window. From the Desktop, eject the hard disk to unmount it. 10. Shut down the VM. (Powering it off should work.) 11. Edit the VM Settings to remove the Rescue CD image from the optical drive. 12. Start the VM. OpenSUSE should start and automatically log in as User1. 13. Open a Terminal window and become root. Your chosen root password should work. 14. Using useradd and passwd, add yourself as a user.
CTEC1863/2018F Bonus Lab Page 5 of 5 15. Log out. Your user should be shown on the login screen. Use VirtualBox to take a screen shot by pressing [Right Ctrl] + [E]. 16. Log back in as your new user. 17. Open a Terminal window and become root. 18. Update Open SUSE with the zypper up command. You will probably need to reboot when it is done updating. 19. Follow the instructions at: https://en.opensuse.org/virtualbox to install the VirtualBox Guest Additions. 20. Shut down the VM. 21. In the VM settings, set up a Shared Folder (refer to Lab 5.) 22. Restart the VM. Edit the /etc/groups file to allow access to the Shared Folder. (Again, refer to Lab 5.) 23. In a Terminal, cd to the shared folder and list the files there. Take another screen shot. When You Are Done Email the screen shots to your professor. (Or post on BB.)