Gaining root access to the operating system

From Robots in everyday human environments

Jump to: navigation, search

Start by inserting the original CF card provided by FESTO in a card reader, and issue the following command (replace emacs with the editor of your choice) from the terminal window:

emacs /media/usbdisk/etc/password.lst

Assuming that the root partition of the CF card is mounted as /dev/media/usbdisk. Replace everything between the two colons. This will remove the current root password, and replace it with blank. Now put the card back into the robot, and start up the system. Log in as root and just press >Enter< when asked for password. If no errors, issue the following command if the blank password should be replaced with a proper one:

passwd

Having gained access to the system, it is now possible to install packages. It is recommended to start out by replacing the standard editor Vim with a much more volatile one such as Emacs. This can be down by first downloading the packages listed in the Table below from http://www.debian.org/distrib/packages, remembering that the target architecture is an “i386”.


Installation packages for Emacs
Package file Description
emacsen-common_1.4.16_all.deb Alternative editor to pre-installed Vim
emacs21-bin-common_21.4a-1_i386.deb

-

emacs21-common_21.4a-1_all.deb

-

emacs21-nox_21.4a-1_i386.deb

-


Having downloaded the packages to a desired folder issue the following commands in order to install them on the Robotino®:

cd <package_folder>
scp *.deb robotino@<robotino_ip_address>:/writeable/.
ssh root@<robotino_ip_address>
cd /writeable/
dpkg -i *.deb

Having installed the Emacs editor, syntax highlighting can be enabled by issuing the following command in the users home directory:

ssh robotino@<robotino_ip_address>
emacs .emacs

It is recommended to copy the created .emacs file to the home directory of the root, in order to enable syntax highlighting for this user too:

ssh root@<robotino_ip_address>
cp /writebale/robotino/.emacs /root/.emacs

Console colours can be activated by editing the .bashrc file:

ssh robotino@<robotino_ip_address>
emacs .bashrc

Read the comments in the file, and remove commented lines where instructed. This procedure can also preferably be carried out for the root user.

Personal tools