(Ubuntu:
Lesson 2)
{ Use Ubuntu 12.04 Grub to boot into
single user mode }
Section 0. Background
Information |
- Background information.
- Lets say you lost the root password and you
have no way to figure it out. No problem. All you simply
have to do is to physically power off the machine and power it back on.
During the start of the reboot, hit the "shift" key.
If you are using VMware, you will need to click in the Black VMware
window before reboot and then press the "shift" key.
- Prerequisite
-
Lab Notes
- In this lab we will do the following:
- We will access the Grub menu during
the boot process.
- We will edit the Grub menu to boot into
single user mode.
- We will change the root password.
- Legal Disclaimer
- As a condition of your use of this Web
site, you warrant to computersecuritystudent.com that you will not use
this Web site for any purpose that is unlawful or
that is prohibited by these terms, conditions, and notices.
- In accordance with UCC § 2-316, this
product is provided with "no warranties, either express or implied." The
information contained is provided "as-is", with "no guarantee of
merchantability."
- In addition, this is a teaching website
that does not condone malicious behavior of
any kind.
- You are on notice, that continuing
and/or using this lab outside your "own" test environment
is considered malicious and is against the law.
- © 2012 No content replication of any kind
is allowed without express written permission.
Section 1: Start
Ubuntu 12.04 |
- Start Ubuntu 12.04
- Instructions
- For Windows 7
- Start --> All Programs --> VMware
Player
- For Windows XP
- Starts --> Programs --> VMware
Player
- Verify Virtual Machine Settings.
- Instructions
- Click on Ubuntu 12.04
- Click on Edit virtual machine settings
- Set CD/DVD(IDE)
- Instructions
- Click on CD/DVD(IDE)
- Select radio button: Use physical drive
- Select Auto detect from the drop down
list.
- DO NOT CLICK THE OKAY BUTTON YET.
- Set Network Adapter
- Instructions
- Click on Network Adapter
- Select radio button: Bridged
- Now, Click the OK Button.
- Start the Ubuntu 12.04 VM
- Instructions
- Click on Ubuntu 12.04
- Click on Play virtual machine
Section 2: Boot to
Grub 2 Menu |
- Boot to Grub 2 Menu
- Instructions
- Once you see the below vmware screen,
(1) Left Click in the screen and (2) press the <Shift> key.
- The Grub 2 Menu
- Informational
- Below is the Grub 2 menu.
- Continue to Next Section.
Section 3: Use Grub
to Boot into Single User Mode |
- Edit the Grub Menu
- Instructions
- Make sure Ubuntu, with Linux
3.2.0-23-generic-pae is highlighted.
- Press "e".
- Cursor Placement
- Instructions
- Cursor down to the line that
starts with "linux /boot/vmlinuz-3.2.0-23-generice-pae".
- Cursor right until your cursor is
positioned directly after $vt_handoff.
- Continue to next step.
- Delete "o quite splash $vt_handoff"
- Instructions
- Use the backspace key to delete the
following characters:
- "o quiet splash $vt_handoff"
- Continue to next step.
- Add the string "w init=/bin/bash"
- Instructions
- Type the follow string after the "r".
- Press <Ctrl> and "x" to boot to single
mode.
- Welcome to root
- Note(FYI):
- You are now the root user
- Continue to next section.
Section 4: Reset the
root password |
- Reset root's password
- Instructions
- passwd root
- Supply the password of your choice.
- Sync and Reboot
- Instructions
- sync
- reboot -f
- Edit the Grub Menu
- Instructions
- Make sure Ubuntu, with Linux
3.2.0-23-generic-pae is highlighted.
- Press "e".
- Boot Machine
- Instructions
- Press <Ctrl> and "x" to boot
the machine.
- Login to Server
- Instructions
- User: Student
- Password: Please supply the student
password.
- Start up a Terminal
- Instructions
- Click on the Terminal
- Test the new root password
- Instructions
- su - root
- Enter your new root password that you
created in
- Proof of Lab
- Instructions
- chage -l root | grep "password change"
- date
- echo "Your Name"
- Replace the string "Your Name" with
your actual name.
- e.g., echo "John Gray"
-
Proof of Lab Instructions
- Press both the <Ctrl> and <Alt> keys at
the same time.
- Do a <PrtScn>
- Paste into a word document
- Upload to Moodle
|
 
|