2

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.

1 Answer 1

1

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.

1
  • From this you can run the LiveUSB Creator
    – user92200
    Sep 25, 2012 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .