top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to change the root password in Ubuntu?

+1 vote
329 views
How to change the root password in Ubuntu?
posted Mar 17, 2014 by Sanjay Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

1) In general Ubuntu has no password for root user.

To manually set a password for the root user, type in the following in the shell:

sudo passwd

After that you are asked to type in the new root password twice. Finally, your root user has its own password.

2) Now if you want to change the password later point of time though there is no need you can do following

sudo -i
passwd

To lock it again

sudo passwd -dl root
answer Mar 17, 2014 by Salil Agrawal
Similar Questions
+1 vote

To start MySQL in safe mode, mysqld_safe command is used which allow it to run in the safe mode and it also doesn’t allow the reading of tables with the database passwords:

[root@ ]# mysqld_safe --skip-grant-tables --skip-networking &[1] 13007
[root@ ]# Starting mysqld daemon with databases from /var/lib/mysql
[root@ ]#

After running the MySQL in safe mode the password protection gets removed and to use the password protection mechanism a command is used as follows:

mysql -u root command
[root@bigboy tmp]# mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.16
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> [ a message is being shown which allow user to take the control of the root]

Now the question is how can I change root password in safe mode?

+2 votes

I want to list all the application installed on ubuntu with date

dpkg -l this command list only installed application i want installed date

...