Find the answer to your Linux question:
Results 1 to 8 of 8
Hi. i have this problem. I was an administrator user in ubuntu linux, but some way may account changed to normal user. and when i trie to unlock and set ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2012
    Location
    Latvia
    Posts
    5

    cant login with root password


    Hi. i have this problem. I was an administrator user in ubuntu linux, but some way may account changed to normal user. and when i trie to unlock and set to administrator it says need root password an my password does not work. when i trie to open sudo su in terminal my password does not work, it says authentification failure.
    when i trie other command it says
    (my nick) does not a sudoers file, this incident will be reported..
    And i cant do anything.. But with my password i can just log in, i cant even install any program... i did not changed my password. i don know what to do

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,197
    You can use your installation disc as a "live disc" to look at your system. This will give you root access. Mount your Ubuntu partition and take a look at the /etc/sudoers file. It normally contains a line like "myname ALL=(ALL) ALL" where myname is the username of the first user to be registered. If this has been corrupted, you will need to restore it using an editor like nano.

    Officially you should only edit sudoers with the visudo command, but you can't do that if you haven't got root access; doing it "from the outside" with a live disc gets you out of the loop.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Just Joined!
    Join Date
    Mar 2012
    Location
    Latvia
    Posts
    5

    help

    i opened nano in terminal, but how to open this sudoer file in nano i have no idea. i drag this file in nano , but there shows just file location. windows i know like my 5 fingers but linux is something new for me. please help.

    p.s. i started ubuntu from cd and find this sudoer file, ans its still read only, i cant copy move or replace it..

  4. #4
    Just Joined!
    Join Date
    Oct 2005
    Location
    Mesquite TX USA
    Posts
    6
    Boot into your system using a CD. In a terminal window, cd to the directory where the sudoers file is. On my Fedora system it is in /etc.
    type ls -l sudoers and note the output. on my system it says
    -r--r-----. 1 root root 3338 Nov 30 2010 sudoers
    Now type chmod 777 sudoers. Since you booted from the CD you should be root and you should be able to do this.
    Now you can edit your sudoers file preferably with visudo. When you are done, save your file.
    Now change the permissions back with
    chmod 440 sudoers
    and there you go. You should be back in business.

  5. #5
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Hi there.
    To use an editor to open a file, use the syntax <editor> </path/to/file>.
    So in your case:
    Code:
    nano /etc/sudoers
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  6. #6
    Just Joined!
    Join Date
    Jan 2009
    Posts
    50
    ok some applications such as synaptic package manager try to run as root and not your username thruogh sudo. root is disabled by default in ubuntu. go to your terminal and do a 'sudo paswd root' and create a password which will unlock the root account, set up a new password and you should be good to go. then from then on out if youre working in the terminal keep using sudo as it is more secure, then when you need to run an application then you will use root's credentials. although i would suggest learning everything from the terminal and not using gui applications, that way you can keep your root account locked.

  7. #7
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    After looking at the post by kr0nik, I'll amend my earlier syntax...

    <sudo> <editor> </path/to/file>
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  8. #8
    Just Joined!
    Join Date
    Mar 2012
    Location
    Latvia
    Posts
    5

    Post thx

    Thx for replays. Maybe with your help i would unlock rott user, but i wasnt so patient and reinstalled ubuntu, but thx anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •