Root access

m (OpenSSH: Touched up list a bit)
m (Removed legacy crap from intro and re-wrote)
Line 1: Line 1:
{{Midgard article}}
{{Midgard article}}
-
 
+
Having [http://en.wikipedia.org/wiki/Root_user root] access is an important step for users interested in modifying their tablets, as without it, you wont have the necessary permissions to do much of anything. Unfortunately, root access is disabled by default on new tablets, and something needs to be done to enable it.
-
OK, first, the disclaimer: '''Doing whatever is stated on this page is not endorsed by Nokia in any way.'''
+
-
 
+
-
''Warning: There have been reports of display failures (white with dim vertical stripes) after disabling rd mode and rebooting a new 770. If you get this, there is a hardware failure in your device and you need to return it and get a replacement.''
+
-
 
+
-
Screenshot added: [http://www.circuitwizard.de/misc/2935.jpg Cracked screen]<nowiki>; </nowiki>[http://maemo.org/pipermail/maemo-users/2006-July/001605.html Screen bug Post].
+
== easyroot ==
== easyroot ==

Revision as of 05:54, 1 July 2008

Image:Ambox_content.png
This is an article from the old midgard wiki that hasn't yet been fully updated for this wiki, please update it.
Please see the talk page for discussion.


Having root access is an important step for users interested in modifying their tablets, as without it, you wont have the necessary permissions to do much of anything. Unfortunately, root access is disabled by default on new tablets, and something needs to be done to enable it.

Contents

easyroot

Install easyroot from nitapps.com.

Then, from the shell, run root. This will give you a root shell.

OpenSSH

  1. Enabled Extras (if you haven't already).
  2. Install OpenSSH (client and server).
  3. SSH into your tablet as root
    • For local access, run ssh root@localhost
    • For remote access, run ssh root@tablet's ip address
  4. Use the root password that the OpenSSH package asked you to enter to log in (in ancient OS versions you had to use the factory default "rootme" password).

R&D Mode

Note: As R&D mode has other side effects beyond simply enabling root access (including several that can negatively impact battery life), it is not the recommended method for gaining root access. Use easyroot instead.

You can enable the Research & Development mode (R&D or RD mode, which enables you to execute sudo gainroot to get a root shell, simply follow the setup steps for flashing covered in Upgrading tablet OS, then execute

sudo ./flasher-3.0 --enable-rd-mode -r

You are now in R&D mode, and the sudo gainroot script's check will be satisfied.

Securing root access

At this point you should have gained root access to your device, and be looking at the root prompt:

#

However, if your wi-fi network is not password protected, so might anyone else near you who has WiFi, SSH and a clue.

You still need to secure root-level access.

You also still need to secure the root account ("rootme" is a terrible password, and direct root log-in access is not necessarily required).

Set user password

Set the password for 'user':

passwd user

Note: when typing a password nothing will be shown on the screen.

Now, for the future, unless you want to keep SSH-ing from another machine, a clever move is to add "user" to sudoers:

echo "user ALL = PASSWD: /bin/su" >> /etc/sudoers

this way your password will be asked in order to become root. Or

echo "user ALL = NOPASSWD: /bin/su" >> /etc/sudoers

in order to become root without having to type your password.

Please keep in mind that password will be cached, so you won't have to type it every time you need to sudo.

Note that if you require a password to become sudo, some built-in apps (notably Application Manager) will appear to not load while they wait silently in the background for the password to be entered. The can be avoided by running a command in the xterm with sudo prior to lauching the app, so as to appease sudo when the OS calls it.

Ok, from now on all you have to do, in your Xterm session, to get root is to write:

sudo su -

Change root password

Note: The OpenSSH requires that the root password be set as part of its installation process, if you have installed OpenSSH you have already completed this step

You MUST change (or disable) your root password before continuing!

Else you will be walking around with a device that can be accessed using a TRIVIAL and well known password.

To change root password (as root user):

passwd

When asked, input (twice) your new password.