Root sudo timeouts are the easiest and safest way of doing this, ill lay out all examples but be warned it is very risky any way you do this although this way is much safer
This opens an editor and points it to the sudoers file -- Ubuntu defaults to nano, other systems use Vi. You're now a super user editing one of the most important files on your system. No stress!
(Vi specific instructions noted with (vi!). (Ignore these if you're using nano)
Use the arrow keys to move to the end of the Defaults line.
(vi!) press the A (capital "a") key to move at the end of the current line and enter editing mode (append after the last character on the line).
where X is the timeout expiration in minutes. If you specify 0 you will always be asked the password. If you specify a negative value, the timeout will never expire. E.g. Defaults env_reset,timestamp_timeout=5
(vi!) hit Escape to return to command mode. Now, if you're happy with your editing, type in :w to write the file and :q to exit vi. If you made a mistake, perhaps the easiest way is to redo from start, to exit without saving (hit Escape to enter the command mode) and then type :q! .
Hit CTRL + X, then Y, then to save your file and exit nano.
You might want to read the sudoers and vi manual pages for additional information.
Reset timeout value using the below
These instructions are to remove the prompt for a password when using the sudo command. The sudo command will still need to be used for Root access though.
Edit the sudoers file
Open a Terminal window. Type in sudo visudo. Add the following line to the END of the file (if not at the end it can be nullified by later entries):
<username> ALL=NOPASSWD: ALL
Replace with your user name (without the <>). This is assuming that Ubuntu has created a group with the same name as your user name, which is typical. You can alternately use the group users or any other such group you are in. Just make sure you are in that group. This can be checked by going to System->Administration->Users and Groups
michael ALL=NOPASSWD: ALL
Type in ^x to exit. This should prompt for an option to save the file, type in Y to save.
Log out, and then log back in. This should now allow you to run the sudo command without being prompted for a password.
Enabling the root account
Enabling the Root account is rarely necessary. Almost everything you need to do as administrator of an Ubuntu system can be done via sudo or gksudo. If you really need a persistent Root login, the best alternative is to simulate a Root login shell using the following command...
sudo passwd root
Re-disabling your root account
If for some reason you have enabled your root account and wish to disable it again, use the following command in terminal...
sudo passwd -dl root
SYSTEM WIDE GROUP SUDO
root$ echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
Log out, and then back in.
Reset sudo timeout
You can make sure sudo asks for password next time by running: