How to Enable Root Login on Ubuntu 14.04

By default, the Root account password is locked in Ubuntu and you will not able to login as Root directly or use the su command to become the Root user. The root user doesn’t have a password set. The steps to enable the root account is very simple. But it is not recommended because it may cause very serious trouble to your system because login as Root means you can do anything.

Issue this command to enable root login on Ubuntu 14.04. You will prompted for a new Unix password. Second password for confirmation :

sudo passwd root

Example :

login as: ehowstuff
ehowstuff@192.168.0.114's password:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sun Apr 27 23:49:57 MYT 2014

  System load:  0.15              Processes:           68
  Usage of /:   3.8% of 31.37GB   Users logged in:     0
  Memory usage: 3%                IP address for eth0: 192.168.0.114
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

4 packages can be updated.
1 update is a security update.

Last login: Sun Apr 27 23:49:57 2014
ehowstuff@ubuntu14:~$ sudo passwd root
[sudo] password for ehowstuff:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
ehowstuff@ubuntu14:~$

How to Download Ubuntu 12.04 ISO

This post will provide you the download link to latest version of Ubuntu Server and Ubuntu Desktop. Ubuntu is the number #1 and the most popular desktop distro in the world. Ubuntu is based on Debian. Ubuntu is a Fast, secure and stylishly simple, the Ubuntu operating system is used by 20 million people worldwide every day. Ubuntu is completely free to download, use and share. T
he following are the download link for Ubuntu Server and Ubuntu Desktop.

Download Ubuntu Server 12.04 64 Bit ISO
Download Ubuntu Server 12.04 32 Bit ISO
Download Ubuntu Desktop 12.04 LTS 64 Bit ISO
Download Ubuntu Desktop 12.04 LTS 32 Bit ISO

At the time this post created, the current version released is Ubuntu 12.04

How to Install and Configure Bind9 DNS on Ubuntu 11.10

Bind is the most popular software and the most widely used Domain Name System (DNS) software on the Internet for providing DNS services. The name BIND stands for “Berkeley Internet Name Domain” and it’s an implementation of the DNS protocols. In this post i will show the steps how to install and configure Bind 9 DNS service on Ubuntu 11.10 linux server.

1. Install Bind9 :

ehowstuff@ehowstuff:~$ sudo apt-get install bind9 -y

2. Setup and configure zone with the name of ehowstuff.local

ehowstuff@ehowstuff:~$ sudo vim /etc/bind/named.conf.local

Add a DNS zone to BIND9. Edit named.conf.local as below :

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "ehowstuff.local" {
             type master;
             file "/etc/bind/db.ehowstuff.local";
        };
~

3. Copy and Use an existing zone file as a template:

ehowstuff@ehowstuff:/etc/bind$ sudo cp /etc/bind/db.local /etc/bind/db.ehowstuff.local

Edit the new zone file db.ehowstuff.local.

ehowstuff@ehowstuff:~$ sudo vim /etc/bind/db.ehowstuff.local

Change configuration as below :

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.ehowstuff.local. root.ehowstuff.local. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.ehowstuff.local.
ns      IN      A       192.168.1.49
box     IN      A       192.168.1.49

4. Any changes that you’ve made to the zone file BIND9 will need to be restarted before it to take effect:

 
ehowstuff@ehowstuff:~$ sudo /etc/init.d/bind9 restart
 * Stopping domain name service... bind9                                            [ OK ]
 * Starting domain name service... bind9                                            [ OK ]

5. Make sure you own workstation or server pointing to dns server. In this case, this Ubuntu server pointed to itself since it’s running bind9.

ehowstuff@ehowstuff:~$ sudo vim /etc/resolv.conf
nameserver 127.0.0.1

6. test your bind9 server :

ehowstuff@ehowstuff:~$ nslookup
> set type=ns
> ehowstuff.local
Server:         127.0.0.1
Address:        127.0.0.1#53

ehowstuff.local nameserver = ns.ehowstuff.local.

How to Install and Configure Bind 9 as a Caching Server on Ubuntu 11.10

Bind is the most popular software and the most widely used Domain Name System (DNS) software on the Internet for providing DNS services. The name BIND stands for “Berkeley Internet Name Domain” and it’s an implementation of the DNS protocols. In this post i will show the steps how to install and configure Bind 9 to act as a caching server on Ubuntu 11.10 linux server.

root@ehowstuff:~# apt-get install bind9 -y

Example :

root@ehowstuff:~# apt-get install bind9 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bind9-host bind9utils dnsutils libbind9-60 libcap2 libdns69 libisc62 libisccc60 libisccfg62
  liblwres60
Suggested packages:
  bind9-doc resolvconf rblcheck
The following NEW packages will be installed:
  bind9 bind9utils libcap2
The following packages will be upgraded:
  bind9-host dnsutils libbind9-60 libdns69 libisc62 libisccc60 libisccfg62 liblwres60
8 upgraded, 3 newly installed, 0 to remove and 56 not upgraded.
Need to get 1,592 kB of archives.
After this operation, 1,479 kB of additional disk space will be used.
Get:1 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main dnsutils i386 1:9.7.3.dfsg-1ubuntu4.1 [142 kB]
Get:2 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main bind9-host i386 1:9.7.3.dfsg-1ubuntu4.1 [53.9 kB]
Get:3 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main libisc62 i386 1:9.7.3.dfsg-1ubuntu4.1 [160 kB]
Get:4 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main libdns69 i386 1:9.7.3.dfsg-1ubuntu4.1 [676 kB]
Get:5 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main libisccc60 i386 1:9.7.3.dfsg-1ubuntu4.1 [18.0 kB]
Get:6 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main libisccfg62 i386 1:9.7.3.dfsg-1ubuntu4.1 [38.8 kB]
Get:7 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main liblwres60 i386 1:9.7.3.dfsg-1ubuntu4.1 [38.6 kB]
Get:8 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main libbind9-60 i386 1:9.7.3.dfsg-1ubuntu4.1 [23.0 kB]
Get:9 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libcap2 i386 1:2.21-2 [12.5 kB]
Get:10 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main bind9utils i386 1:9.7.3.dfsg-1ubuntu4.1 [102 kB]
Get:11 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main bind9 i386 1:9.7.3.dfsg-1ubuntu4.1 [327 kB]
Fetched 1,592 kB in 18s (88.4 kB/s)
Preconfiguring packages ...
(Reading database ... 50749 files and directories currently installed.)
Preparing to replace dnsutils 1:9.7.3.dfsg-1ubuntu4 (using .../dnsutils_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement dnsutils ...
Preparing to replace bind9-host 1:9.7.3.dfsg-1ubuntu4 (using .../bind9-host_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement bind9-host ...
Preparing to replace libisc62 1:9.7.3.dfsg-1ubuntu4 (using .../libisc62_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement libisc62 ...
Preparing to replace libdns69 1:9.7.3.dfsg-1ubuntu4 (using .../libdns69_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement libdns69 ...
Preparing to replace libisccc60 1:9.7.3.dfsg-1ubuntu4 (using .../libisccc60_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement libisccc60 ...
Preparing to replace libisccfg62 1:9.7.3.dfsg-1ubuntu4 (using .../libisccfg62_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement libisccfg62 ...
Preparing to replace liblwres60 1:9.7.3.dfsg-1ubuntu4 (using .../liblwres60_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement liblwres60 ...
Preparing to replace libbind9-60 1:9.7.3.dfsg-1ubuntu4 (using .../libbind9-60_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Unpacking replacement libbind9-60 ...
Selecting previously deselected package libcap2.
Unpacking libcap2 (from .../libcap2_1%3a2.21-2_i386.deb) ...
Selecting previously deselected package bind9utils.
Unpacking bind9utils (from .../bind9utils_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Selecting previously deselected package bind9.
Unpacking bind9 (from .../bind9_1%3a9.7.3.dfsg-1ubuntu4.1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ufw ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up libisc62 (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up libdns69 (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up libisccc60 (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up libisccfg62 (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up libbind9-60 (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up liblwres60 (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up bind9-host (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up dnsutils (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up libcap2 (1:2.21-2) ...
Setting up bind9utils (1:9.7.3.dfsg-1ubuntu4.1) ...
Setting up bind9 (1:9.7.3.dfsg-1ubuntu4.1) ...
Adding group `bind' (GID 113) ...
Done.
Adding system user `bind' (UID 105) ...
Adding new user `bind' (UID 105) with group `bind' ...
Not creating home directory `/var/cache/bind'.
wrote key file "/etc/bind/rndc.key"
#
 * Starting domain name service... bind9                                                     [ OK ]
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

The main configuration is stored in the following files:

root@ehowstuff:~# ls /etc/bind | grep named
named.conf
named.conf.default-zones
named.conf.local
named.conf.options

To configure bind9 to act as a caching server, all that is required is simply adding the IP numbers of your ISP’s DNS servers or alternatively you can use free google dns server as below :

root@ehowstuff:~# vim /etc/bind/named.conf.options

Uncomment and edit the following in /etc/bind/named.conf.options :

.
.
.
    forwarders {
                8.8.8.8;
         };
.
.
.

Start or restart caching named service :

As a root :

root@ehowstuff:~# /etc/init.d/bind9 restart
 * Stopping domain name service... bind9                                                     [ OK ]
 * Starting domain name service... bind9                                                     [ OK ]

or restart bind as normal user :

ehowstuff@ehowstuff:~$ sudo /etc/init.d/bind9 restart
[sudo] password for ehowstuff:
 * Stopping domain name service... bind9                                                     [ OK ]
 * Starting domain name service... bind9                                                     [ OK ]

Verify caching dns server completely working using dig command. Use dig command to query google.com :

root@ehowstuff:~# dig www.google.com

; <<>> DiG 9.7.3 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40642
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 13, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         86322   IN      CNAME   www.l.google.com.
www.l.google.com.       223     IN      A       209.85.175.99
www.l.google.com.       223     IN      A       209.85.175.103
www.l.google.com.       223     IN      A       209.85.175.104
www.l.google.com.       223     IN      A       209.85.175.105
www.l.google.com.       223     IN      A       209.85.175.106
www.l.google.com.       223     IN      A       209.85.175.147

;; AUTHORITY SECTION:
.                       14355   IN      NS      m.root-servers.net.
.                       14355   IN      NS      l.root-servers.net.
.                       14355   IN      NS      f.root-servers.net.
.                       14355   IN      NS      d.root-servers.net.
.                       14355   IN      NS      k.root-servers.net.
.                       14355   IN      NS      j.root-servers.net.
.                       14355   IN      NS      g.root-servers.net.
.                       14355   IN      NS      h.root-servers.net.
.                       14355   IN      NS      i.root-servers.net.
.                       14355   IN      NS      a.root-servers.net.
.                       14355   IN      NS      e.root-servers.net.
.                       14355   IN      NS      b.root-servers.net.
.                       14355   IN      NS      c.root-servers.net.

;; Query time: 14 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Apr  8 16:21:07 2012
;; MSG SIZE  rcvd: 359

How to Check Ubuntu Version

Question :
How to check Ubuntu Version that you are running?

Answer :
To print out the Ubuntu version you are running, you can run either one of the following commands :

1. Run “/etc/issue” :

root@ehowstuff:~# more /etc/issue
Ubuntu 11.10 \n \l

2. Run “lsb_release -a” :

root@ehowstuff:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:        11.10
Codename:       oneiric

How to Change Hostname on Ubuntu 11.10

This post will shows you how to quickly change hostname on Ubuntu 11.10. Assumed that you have root account access on Ubuntu 11.10 linux server. There are two way to change the hostname on Ubuntu serve or desktop. Either you modify /etc/hostname using vi command or simply run the echo command as shown on example below :

1. Modify /etc/hostname using echo command :

root@ubuntu11:~# echo ehowstuff.example.com > /etc/hostname

2. Modify /etc/hostname using vi editor and enter your new hostname :

root@ubuntu11:~# vi /etc/hostname

This steps is required for both above steps (1) and (2). To get the new hostname to take effect, restart the hostname as below :

root@ubuntu11:~# /etc/init.d/hostname restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service hostname restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop hostname ; start hostname. The restart(8) utility is also available.
hostname stop/waiting

How to check the updated or current hostname :

root@ehowstuff:~# hostname
ehowstuff.example.com

How to Install vim-nox on Ubuntu 11.10

It is recommended that the vi user, to install vim-nox package on their Ubuntu server. The purpose of vim-nox package is to ensure that the vi text editor behaves as expected. Otherwise you may might facing an experience some strange behaviour in the vi text editor on Ubuntu 11.10.

To install vim-nox on Ubuntu 11.10 linux server, please run the following command :

root@ubuntu11:~# apt-get install vim-nox -y

Example :

root@ubuntu11:~# apt-get install vim-nox -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  liblua5.1-0 libperl5.12 libreadline5 libruby1.8 tcl8.5
Suggested packages:
  tclreadline cscope vim-doc
The following NEW packages will be installed:
  liblua5.1-0 libperl5.12 libreadline5 libruby1.8 tcl8.5 vim-nox
0 upgraded, 6 newly installed, 0 to remove and 64 not upgraded.
Need to get 4,800 kB of archives.
After this operation, 16.7 MB of additional disk space will be used.
Get:1 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main liblua5.1-0 i386 5.1.4-10 [91.9 kB]
Get:2 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libperl5.12 i386 5.12.4-4 [698 kB]
Get:3 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libreadline5 i386 5.2-9ubuntu1 [123 kB]
Get:4 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main libruby1.8 i386 1.8.7.352-2ubuntu0.1 [1,781 kB]
Get:5 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main tcl8.5 i386 8.5.10-1ubuntu1 [1,106 kB]
Get:6 http://sg.archive.ubuntu.com/ubuntu/ oneiric/universe vim-nox i386 2:7.3.154+hg~74503f6ee649-2ubuntu3 [1,000 kB]
Fetched 4,800 kB in 47s (102 kB/s)
Selecting previously deselected package liblua5.1-0.
(Reading database ... 49787 files and directories currently installed.)
Unpacking liblua5.1-0 (from .../liblua5.1-0_5.1.4-10_i386.deb) ...
Selecting previously deselected package libperl5.12.
Unpacking libperl5.12 (from .../libperl5.12_5.12.4-4_i386.deb) ...
Selecting previously deselected package libreadline5.
Unpacking libreadline5 (from .../libreadline5_5.2-9ubuntu1_i386.deb) ...
Selecting previously deselected package libruby1.8.
Unpacking libruby1.8 (from .../libruby1.8_1.8.7.352-2ubuntu0.1_i386.deb) ...
Selecting previously deselected package tcl8.5.
Unpacking tcl8.5 (from .../tcl8.5_8.5.10-1ubuntu1_i386.deb) ...
Selecting previously deselected package vim-nox.
Unpacking vim-nox (from .../vim-nox_2%3a7.3.154+hg~74503f6ee649-2ubuntu3_i386.deb) ...
Processing triggers for man-db ...
Setting up liblua5.1-0 (5.1.4-10) ...
Setting up libperl5.12 (5.12.4-4) ...
Setting up libreadline5 (5.2-9ubuntu1) ...
Setting up libruby1.8 (1.8.7.352-2ubuntu0.1) ...
Setting up tcl8.5 (8.5.10-1ubuntu1) ...
update-alternatives: using /usr/bin/tclsh8.5 to provide /usr/bin/tclsh (tclsh) in auto mode.
Setting up vim-nox (2:7.3.154+hg~74503f6ee649-2ubuntu3) ...
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vim (vim) in auto mode.
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vimdiff (vimdiff) in auto mode.
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/rvim (rvim) in auto mode.
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/rview (rview) in auto mode.
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vi (vi) in auto mode.
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/view (view) in auto mode.
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/ex (ex) in auto mode.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

How to Configure Static IP Address on Ubuntu 11.10

During the installation, Ubuntu installer has configured this server to get it’s ip address via DHCP, then we have to change this because a server should have a static IP address. This post will guide you how to configure static ip address on Ubuntu 11.10 linux server. This steps may working on other versions of Ubuntu.

Edit /etc/network/interfaces as per below command :

root@ubuntu11:~# vi /etc/network/interfaces

Original network interface configuration on Ubuntu 11.10 server is as below :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

As an example, configure static ip address as below :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.49
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

How to restart the network interface :

root@ubuntu11:~# /etc/init.d/networking restart

How to Enable the root Login on Ubuntu 11.10

In this post, i will show on how to enable root login in Ubuntu 11.10 linux server. This post assumed that you already installed Ubuntu 11.10 server. Besides, that is assumed i had created the username ‘ehowstuff’ on my previous installation of Ubuntu 11.10 server and login to this Ubuntu 11.10 server as ehowstuff account.

login as: ehowstuff
ehowstuff@192.168.1.37's password:
Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-12-generic-pae i686)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Apr  3 20:57:51 MYT 2012

  System load:  0.11              Processes:           66
  Usage of /:   6.5% of 13.50GB   Users logged in:     1
  Memory usage: 3%                IP address for eth0: 192.168.1.37
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/
Last login: Tue Apr  3 20:54:22 2012
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.

ehowstuff@ubuntu11:~$ 

To enable the root login and create root password, please enter “sudo passwd root” on the terminal. Then you will be asked to enter your login password (in this case i login as ehowstuff), followed by the password of ROOT account (enter new UNIX password).

ehowstuff@ubuntu11:~$ sudo passwd root
[sudo] password for ehowstuff:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

After this steps done, you can then directly log in as root either through putty or terminal.

How to Download Ubuntu Server 11.10 ISO

Ubuntu is the number #1 and the most popular desktop distro in the world. Ubuntu is based on Debian. Ubuntu is a Fast, secure and stylishly simple, the Ubuntu operating system is used by 20 million people worldwide every day. However, Ubuntu does not come with a load of software and codecs pre installed like Linux Mint and new users may have trouble playing certain media formats and may require a few command line installations. But it still the most popular Linux distribution because it has excellent community support and comes with excellent wall papers and artwork. This post will provide you the link where you actually can download Ubuntu Server 11.10 ISO and it’s completely free.

Download Ubuntu Server now
At the time this post created, the current version released is Ubuntu Server 11.10.

http://www.ubuntu.com/download/server/download