0

I have installed Ubuntu 14.04 LTS . During installation on my Windows PC using VMWARE Player, it asked a username and I provided one. But now after successful installation, I also want to login as the root user. But unfortunately I don't know how to retrieve the root password or change it. How can I log in as the root user?

user165062
  • 2,253
  • 3
  • 15
  • 6

1 Answers1

-2

If you lose control of root:

Before you format again, check /etc/passwd, e.g.,

gvim /etc/passwd 

you should see a line like

root:x:0:0:root:/root:/bin/csh

sometimes this gets incorrectly modified, e.g.:

root:x:0:0:root:/root:csh

Essentially the system cannot find the location of the installed shell from where to invoke root. Correct it!

You should have root access back!

use the following method to give yourself permission to modify that file.

sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www
belacqua
  • 23,540