#setting password for root in unix/linux (ubuntu 12.04)

#open up your terminal
#-----------::::::::::::--------:::::::::::---------::::::::::::--------:::::::::::-----
#solution 1

:~$ su
#your xxbeh password
#passwd
#type new password and confirm

#-----------::::::::::::--------:::::::::::---------::::::::::::--------:::::::::::-----
#solution2

#In Ubuntu, by default, there is not really a root user,
#but only root access which can be gained using sudo,
#for instance, to update your repository list:

:~$ sudo apt-get update

#Root is created without predefined password,
#it does not have a password, but it does not have an empty password either,
#you just can't login!!!

#-----------::::::::::::--------:::::::::::---------::::::::::::--------:::::::::::-----
#solution 3

:~$ sudo sh
#Password:
#sh-3.1#
#-----------::::::::::::--------:::::::::::---------::::::::::::--------:::::::::::-----
#solution 4

#Launch a shell as root. Therefore, using sudo you can type:

:~$ sudo passwd
#Password:
#Enter new UNIX password:
#Retype new UNIX password:

-----------::::::::::::--------:::::::::::---------::::::::::::--------:::::::::::-----