110

I want to login as root, but when I enter

sudo -s

and enter password, this message is shown: "you are not in sudoers file", and when I enter

su

and enter password, this is shown: "authentication failure".

My os has one account only. about past1 hours ago I log on as root and do some commands , when I logout , I can't login another time!

Jorge Castro
  • 71,754
ava
  • 1,103
  • We'd need to know what commands you ran when you were root. You might need to reset your password: http://askubuntu.com/questions/24006/how-do-i-reset-a-lost-administrativeroot-password – Jorge Castro Dec 31 '11 at 21:47
  • Do you want to change user in terminal as you used su command? if you want to then you need to have the root password – Jatttt Mar 05 '14 at 14:45

4 Answers4

81

The su command requires you to put in root password. Root user on Ubuntu in general is locked so no user can login as root thus su is not likely to work.

For sudo -s to work you will have to be part of the admin group on an Ubuntu machine, which apparently you are not.

If you are the only user on the system that is concerning and may be quite involved to fix. If not I would suggest you talk to the System Administrator or owner of the system to see if you even can get root privileges.

Karlson
  • 1,619
75

Be aware that the root account is not active by default.

You will need to do:

sudo passwd root

Then go ahead to set password. Use the root user using

su root
Eric Carvalho
  • 54,385
Ronald
  • 751
  • 5
  • 2