Working Without a Password

From FreekiWiki
Revision as of 16:13, 28 December 2012 by Paulm (talk | contribs) (→‎Ubuntu 10.04)
Jump to navigation Jump to search

You should not need a customer's username and password to do most of the work in Tech Support.

  1. start the computer booting up, and hold down the right shift key.
  2. After a few (or 10 or 20) seconds you will see the grub menu, which is characterized by a line or lines that will say ...kernel 2.6... If you can't get to this see #Altering the Grub Timeout below
  3. Hit the down arrow once to get to a line that ends with recovery mode and press enter.
  4. This will bring up a menu with many options.

Ubuntu 10.04

The two that you're looking for are netroot and root.  Netroot will set up networking on the machine, and then drop you to a root shell.  root will just drop you to a root shell without any further setup.
  1. Type startx and you will be logged into a desktop environment.

N.B. You should not use this to reset a user's password, unless absolutely necessary (i.e they have forgotten it and need it resetting) and never for routine work. The rootshell gives you all the privileges you need. If you need to test something in an ordinary users environment create a new user then delete it when you have finished.

Ubuntu 10.04

The two that you're looking for are networking and root. Netroot will set up networking on the machine, and then drop you to a root shell with the disk mounted read write . root will just drop you to a root shell without any further setup. In Ubuntu 12.04 the root shell mounts the hard drive read-only.

To mount a disk read write use the following command

  mount -o,remount,rw /dev/mapper/freeegeek-root

on a normal Free Geek install otherwise try:

  mount -o,remount,rw /dev/sda1 etc
  1. Type startx and you will be logged into a desktop environment.

N.B. You should not use this to reset a user's password, unless absolutely necessary (i.e they have forgotten it and need it resetting) and never for routine work. The rootshell gives you all the privileges you need. If you need to test something in an ordinary users environment create a new user then delete it when you have finished.

Altering the Grub Timeout

Ubuntu uses Grub2 which has a configuration option to set the amount of time you have to press the shift key to get to the grub menu. If you find it difficult to get to this menu you can use a rescue disk to increase the amount of time you have.

  1. Boot off of a rescue disk. On the Free Geek build network (i.e. in Tech Support) you can net boot then chose the live boot option -> Debian Images-> Debian Rescue.
  2. Once it has booted use Sudo fdisk -l to find the hard drive of the machine you are booting: norma.lly it is /dev/sda1, the first partition on the drive.
  3. Mount that drive: sudo mount /dev/sdXX /mnt e.g. sudo mount /dev/sda1 /mnt
  4. next you will need to mount the virtual filesystems: for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
  5. Then chroot into that filesystem chroot /mnt
  6. Now you can edit the relevant grub config file. With grub2 this is /etc/default/grub
  7. Look for a line that begins GRUB_HIDDEN_TIMEOUT=, amke sure it isn't commented out with a #
  8. Edit this line to give a reasonable amount of time. GRUB_HIDDEN_TIMEOUT=3 (a 3 second delay).
  9. Run sudo update-grub so grub knows about the changes.
  10. Exit chroot exit
  11. Unmount the virtual filesystems: for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
  12. Unmount the hard drive sudo umount /dev/sdXX e.g. sudo umount /dev/sda1
  13. reboot the system and boot normally.