Daily Archives: February 13, 2010

How to make Ubuntu to not ask for password when you do sudo?

There are some commands in ubuntu that do not work without ‘sudo’ing. Like while creating a text file you use ‘sudo vi’ instead of just ‘vi’ and then you had to enter password again. This is the security scheme used by Ubuntu to save your files from external attacks.
If entering password for every command is uninteresting and frustrating, then here is a solution to it.
Step1 -
Open your terminal and type the following -
sudo visudo
Now enter your password and visudo will appear. Visudo is an editor used to safely edit this file called – sudoers. sudoers is a file located in /etc directory and it contains the information of who can use sudo.
Step2 -
At the end of the file add the following line
%username ALL=(ALL) NOPASSWD: ALL
Make sure you replace username with the username of your account and don’t forget to retain the ‘%’ symbol at the beginning. Save & Exit.
That’s it. You’re done. Though this makes everything easy, it is not so recommended. By enabling this, you will be exposed to attacks since no password is required. There is an alternate way. You can specify all the commands in the statement itself so that only those commands do not need passwords. An example is here -
%username ALL=(ALL) NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm
With this, you ll be able to use only kill, ls and lprm commands without password.

Google Public DNS – "What is?" and "How to?"

DNS stands for Domain Name System. Let’s not delve deep in understanding the whole function of a DNS. For now, just remember this. It is a system that names all the computers connected to the internet in an hierarchical order. It is also a system to convert human-friendly addresses(domain names) like www.something.com to its computer-friendly address like 192.159.233.1. The DNS system is like a phone-book to all the devices connected to Internet. Whenever you try to connect to a website with its domain name, your computer performs a DNS look up. Without a DNS service, you will have to enter IP addresses instead of easy-to-remember Domain names. It is also the condition when your DNS server is down.

So now that you have a clear picture of what a DNS is, let me introduce you to Google Public DNS. It is yet again, a Google-brand. Google Provides you a DNS service to resolve the domain names. You need to configure your network settings to use the IP addresses 8.8.8.8 or 8.8.4.4 as your DNS Servers. Instructions to configure are given in the link -

http://code.google.com/speed/public-dns/docs/using.html

If you’re wondering what’s the use of Google DNS, then it is the reliability and speed. Google DNS servers are always ON. I happened to switch to Google DNS only because my default DNS was down. It has never gone down since then. It also improves the security of browsing. It’s Google after all.

Happy Surfing. :)