1

I am not able to change into a root user, problem is when I give the command root, it asks for password, but the keyboard doesn't work after that though the enter key. After three strikes says "three incorrect attempts".

This is what it shows

avinish@ubuntu:~$ /etc/sudoers
bash: /etc/sudoers: Permission denied

Please help!

5

3 Answers 3

2

Type in sudo su rootin your terminal window. It will prompt you for your login password. That is, type in youur regular password. Once you have done that you will see root@ubuntu:/home/avinish# instead of avinish@ubuntu:~

Now typepasswd and hit the enter key.

It will prompt you to enter new unix password. Give in watever password you want for the root user.

Note: you wont be able to see anything while entering your password.

2

By default root is locked on Ubuntu for several reasons and sudo is prefered instead or gksudo for applications with a GUI.

It can be enabled but I would not recommend it. If you really want to enable root see here but read all the answers first.

Open a terminal CTRL+ALT+T and enter

sudo -i

and enter your password. Inside that terminal you are now root. When you have finished type exit or just close the terminal and you are back to being you.


Also even as root /etc/sudoers wont do anything useful its a text file.

If you want to see what is in this file try:

sudo cat /etc/sudoers

And if you want to edit it

sudo visudo

In either case you will be asked for a password. This is your login password. When you type there is nothing displayed but it is being accepted just type it and press enter.

0

sudo -s or sudo su might help your cause . The keyboard does work but in ubuntu passwords don't get showed . You will have to re-type the password again to confirm , so remember what you had typed earlier . You might want to change file permissions too after gaining access roots , so look into chown and chmod commands (Additional info.) . Hope it helps :)

3
  • 3
    No - you do not want to change file permissions as root - please get familiar with Ubuntu first, learn the file system hierarchy and get used to benefits of file permissions before you use potentially very harmful commands like chown or chmod on your system. These commands are not meant to be run when you are a beginner and may quickly lead to an entirely broken system that may not even want to boot.
    – Takkat
    May 31, 2013 at 10:03
  • I agree , that's why i said him to "look into" and not use it. The more knowledge he has regarding these permissions, the easier it will get to execute things faster . I was stuck on it for 3 days . so i didn't wanted others to face a similar problem . May 31, 2013 at 11:21
  • You should edit your answer and clearly say so then.
    – Takkat
    May 31, 2013 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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