Results 1 to 3 of 3

Thread: Can't sudo!

  1. #1
    Join Date
    Mar 2007
    Location
    Jordan
    Beans
    80
    Distro
    Ubuntu 8.04 Hardy Heron

    Can't sudo!

    I think this happened when I added a new user, using the Administration> Users and Groups, named 'admin'

    After a while, I noticed that all apps that need authentication "gksu" and all other utilities in the Administration menu, crashes after entering the password, and utilities with the new "unlock" button, like the nm-applet, will hang for a while and then display an error, something about permission.

    The weird thing that when i use sude in the terminal, it will ask me for my password, will know if i entered it correctly, then do absolutely nothing! not even display a warning message.

    I also can't log as root root form tty1.

    Can some one please help me? I can't boot from the CD or do a fresh installation since this is a laptop and the CD drive is broken, I can only boot from damn small linux using a USB.

    [edit] I can see from Users and Groups that I no longer have; Administer the system, send and receive faxes, use scanners, and use tape drives checked. Can't edit it though
    Last edited by mardawi; May 8th, 2008 at 11:06 PM.

  2. #2
    Join Date
    May 2007
    Beans
    7,032
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Can't sudo!

    You'll need to boot into "recovery mode" first. You can do this by selecting that option from the boot menu, which shows up immediately after the BIOS.

    Then, you'll want to check on two things:

    1) Make sure that your user is a member of the "admin" group:
    Code:
    groups username
    The output should include the word "admin." If it doesn't, type the following command:
    Code:
    adduser username admin
    2) Make sure that /etc/hosts is configured correctly. First, get the correct hostname from the computer by typing:
    Code:
    hostname
    Make a note of the output.

    Then, you'll edit the file to make sure that it's correct:
    Code:
    nano /etc/hosts
    The second line should begin with the address 127.0.1.1. Following that should be the hostname you got from the previous command. If it doesn't match up exactly, change it so that it does.

    Now you can restart your computer and boot up normally:
    Code:
    shutdown -r now
    I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile
    Should I PM support questions? NO!

  3. #3
    Join Date
    Mar 2007
    Location
    Jordan
    Beans
    80
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can't sudo!

    Worked like a charm!

    So it was wrong to create a new user with the name "admin"?

    My /etc/hosts file was empty, and i left it so, i remember it was empty before. But everything works now... Thanks a lot!

Bookmarks

Posting Permissions

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