Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

/etc/passwd

After

John:x:1000:1000:John,,,:/home/serg:/bin/bash

Before

serg:x:1000:1000:John,,,:/home/serg:/bin/bash


/etc/hosts

After

127.0.0.1       localhost
127.0.1.1       John-The-Rippe

Before

127.0.0.1       localhost
127.0.1.1       serg-Protege

/etc/hostname

After

John-The-Ripper

Before

serg-PORTEGE-Z835

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.
ater.

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
add comment

1 Answer 1

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 –  saleemrashid1 Sep 25 '12 at 16:14
    
Thank you very much –  Vor Sep 28 '12 at 18:49
add comment

Your Answer

 
discard

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.