Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to fix Ubuntu Accounts but somehow don't really see how it could be done.

The problem is: files /etc/passwd and /etc/hostname and /etc/hosts where changed.







After       localhost       John-The-Rippe

Before       localhost       serg-Protege






I was trying to simply changed this files but can not do this because permission denied. When I'm trying to login as a root I got this message:

John@John-The-Ripper:~$ sudo -s
[sudo] password for John: 
John is not in the sudoers file.  This incident will be reported

The file sudoers is empty:

John@John-The-Ripper:~$  vi /etc/sudoers

When I type users in cp:

John@John-The-Ripper:~$ users
John John

When I type id, I got this:

John@John-The-Ripper:~$ id
uid=1000(John) gid=1000(serg) groups=1000(serg)

This doesn't work either:

John@John-The-Ripper:~$ usermod -l John serg
usermod: user 'serg' does not exist
John@John-The-Ripper:~$ adduser serg
adduser: Only root may add a user or group to the system.

Then I tried to go to the GRUB menu and from there log in as a root. I did this, but however when I tried to create user serg, it gave me an error that group already exist. When I tried to change /etc/passwd it said permission denied.

And this doesn't do the trick:

John@John-The-Ripper:~$ visudo
visudo: /etc/sudoers: Permission denied
visudo: /etc/sudoers: Permission denied

Also the last thing I tried to do is to create a bootable USB and reinstall Ubuntu, however I cannot open USB-Creator because it asked me a root passwordd. But it doesn't work.

Help me please.

share|improve this question
up vote 1 down vote accepted

If you have GRUB2 on boot hold Shift on boot. Then press c. Now enter:

set isofile="/boot/myiso.iso"

loopback loop (hd0,1)$isofile

linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject initrd (loop)/casper/initrd.lz

In this example the device it is stored on is /dev/sda1 and the ISO is /boot/myiso.iso.

share|improve this answer
From this you can run the LiveUSB Creator – spudowiar Sep 25 '12 at 16:14
Thank you very much – Vor Sep 28 '12 at 18:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.