Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: problems editing /etc/sudoers

  1. #1
    Join Date
    May 2011
    Beans
    167

    problems editing /etc/sudoers

    hello there,
    I am having following problem:

    I have created an account using the terminal and now this standard user doesn't seem to be able to perform sudo tasks, such as sudo apt-get update. (just an ubuntu example)

    after a bit of research I found out that I had to edit /etc/sudoers. Unfortunately I wasn't able to follow the guides offered by the web. I didn't really get if I had to put my account on the same stage as root so:

    user ALL=(ALL) ALL

    or edit something else... (do I really have to use vim as an editor - referring to visudo?)

    But basically what I want is a standard account which is able to perform root tasks by using sudo.

    --> when I try to sudo something it always tells me that the password would be wrong, though it is the exact same password I always use to log in as root.

    is somebody there who can give me a bit of support in this issue?

    any help is really appreciated!!!

    PS: I am using slackware but I guess that should not be a problem at all
    “No great discovery was ever made without a bold guess”

  2. #2
    Join Date
    Feb 2008
    Beans
    5,636

    Re: problems editing /etc/sudoers

    Code:
    su
    to go into the root account and then
    Code:
    EDITOR=nano visudo
    to edit the sudoers file with nano.
    Add the line
    Code:
    your_new_username ALL=(ALL) ALL
    save, exit, reboot, post what happened.

  3. #3
    Join Date
    May 2011
    Beans
    167

    Re: problems editing /etc/sudoers

    wow, that was quick!

    thanks for your quick reply,
    but am I meant to edit the privileges, where root is listed as well? ( so just to get this right, I am allowed to use any editor I want, because in the document it says "use visudo" - guess that is just the preferred editor by the os)

    to sum up:
    - edit the empty line beneath "root ALL ...."
    “No great discovery was ever made without a bold guess”

  4. #4
    Join Date
    Feb 2008
    Beans
    5,636

    Re: problems editing /etc/sudoers

    Just add the line I've posted you at the end of the file.

  5. #5
    Join Date
    May 2011
    Beans
    167

    Re: problems editing /etc/sudoers

    Not working, it still doesn't accept the password...

    suggestions?
    “No great discovery was ever made without a bold guess”

  6. #6
    Join Date
    Sep 2010
    Beans
    898

    Re: problems editing /etc/sudoers

    If your /etc/sudoers file contains a line like this:

    Code:
    %admin ALL=(ALL) ALL
    then another solution is to add the user to the "admin" group. By default, only the first user (created during installation) is added to this group.

  7. #7
    Join Date
    May 2011
    Beans
    167

    Re: problems editing /etc/sudoers

    that might represent a great possibility (the admin group)
    --> in slackware, you've just got root...

    I will tell you if it worked

    thanks for the reply
    “No great discovery was ever made without a bold guess”

  8. #8
    Join Date
    May 2011
    Beans
    167

    Re: problems editing /etc/sudoers

    using the terminal and "su" I am able to log in as root, but if I try "sudo" it's still not working...

    I have created an account and added it to the adm group (well at least I think I did).
    Can I edit /etc/group to change something or is there another password for sudo than root?

    --> toor doesn't work as well

    - please stick to this thread

    I appreciate any help!!!
    “No great discovery was ever made without a bold guess”

  9. #9
    Join Date
    Feb 2008
    Beans
    5,636

    Re: problems editing /etc/sudoers

    Can you post us the contents of your sudoers file?

  10. #10
    Join Date
    Sep 2010
    Beans
    898

    Re: problems editing /etc/sudoers

    "adm" or "admin"? Ubuntu has both groups, but the latter is the one in /etc/sudoers.

    I think that you can add a user to a group by editing /etc/group, but the "usermod" command is the normal way to make that change.

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •