Page 2: Using Android As A Modem Page 3: Reset Ubuntu Password With Live CD
Page 2: Using Android As A Modem Page 3: Reset Ubuntu Password With Live CD
I have a mobile phone running Android and a 3G data package. Can I use this
to connect my laptop to the internet instead of paying out for another package
and a 3G modem dongle?
Yes. Most smartphones are able to act as a modem, usually over a USB or
Bluetooth connection. This isn't possible (May 2010) with a standard Android
system because root access is needed for this. It's however possible to gain
root access to an Android phone without much difficulty. However, there are
security implications of giving root access to all applications running on your
phone. There is an alternative, Proxoid, which turns your phone into a web
proxy server, and the Android developers' kit includes the software needed to
send TCP requests to the phone over a USB cable.
When you now connect your phone, the device node that udev creates would
be owned by you.
The next thing you would need to install would be the Android SDK (it may be
on your distro's repositories). You can download it from here. Get the tar ball
and unpack somewhere in your home directory.
This command forwards TCP connections to port 8080 on the computer to port
8080 on the phone. The next step is to set up your browser to use a proxy
server at localhost port 8080 and all its requests will go through the phone.
When you want to switch back to your usual internet connection, turn of the
proxy.
Resetting Ubuntu password with live CD
I got a PC set up and installed Ubuntu on it. Unfortunately I could not log in
after install as I had forgotten the password. Is there a way to get around this?
There is a way around this which requires the use of a live CF and the
command line. Any live CD will do. Boot from the CD and when the desktop
appears, go to Places>Computer where you will see a list of the drives and
partitions. Select the one where you installed Ubuntu. It should be mounted in
the live environment as /media/disk.
Chroot, or change root changes the root directory to the path you give and runs
whatever command comes next. Sudo doesn't ask for a password because the
live CD user doesn't have one. So this swithces you to the root of your installed
system and runs the Bash shell. You are now inside your Ubuntu installation as
root and can change your password with
$passwd yourusername
It will ask you for the new password twice and then write it to disk. If you can't
remember the username you used, you can find it with
$grep :1000: /etc/passwd
Ubuntu sets the first user to have a user ID of 1000, and grep searches for that
in the password file. The username is the first item of the line it returns. Press
Ctrl+D to exit the chroot, reboot and eject the CD. You can now log in with the
password you just set.