Announcement

Collapse
No announcement yet.

su and sudo stopped working

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    su and sudo stopped working

    I don't know how this happened, but all of a sudden I get authentication errors from both su and sudo. I'm using the same password as I've used in the past, and I am able to log in with that password. How can I get around this problem?

    #2
    Re: su and sudo stopped working

    Originally posted by pwabrahams
    I don't know how this happened, but all of a sudden I get authentication errors from both su and sudo. I'm using the same password as I've used in the past, and I am able to log in with that password. How can I get around this problem?
    What is the exact error message?

    Few things that can cause errors with sudo:
    1. user not part of "admin" group
    2. editing /etc/sudoers, either creating a syntax error or modifying the default settings
    3. editing computer hostname manually, the hostname in /etc/hostname not set as a localhost hostname in /etc/hosts.

    su will ask for root password (unlike sudo), which is disabled in *buntus

    Comment


      #3
      Problem with admin group

      I've narrowed the problem down to this: the authorized users (there are two of them) are shown in Systems Settings and in /etc/group as being in the adm group. /etc/sudoers (which I never modified) contains the line %admin ALL=(ALL) ALL. Since user pwa is in the admin group, he should have root access, But:
      Code:
      pwa@Lepiota:~$ whoami
      pwa
      pwa@Lepiota:~$ sudo echo hello
      [sudo] password for pwa:
      pwa is not in the sudoers file. This incident will be reported.
      pwa@Lepiota:~$ grep "adm:" /etc/group
      adm:x:4:paul,pwa

      Comment


        #4
        Re: su and sudo stopped working

        "adm" and "admin" are separate groups (with different functions, to use sudo you need to be in the admin group)
        Code:
        grep "admin:" /etc/group
        you can add a user to group with adduser (as this needs admin access, you may need to boot into recovery mode to get to root shell if you cant use sudo...of course, if user "paul" is in the admin group, you can add pwa to admin with sudo by logging in as paul).

        Code:
        sudo adduser pwa admin
        (or "adduser pwa admin" in a root shell)

        Comment


          #5
          admin/adm

          Yes, that was the problem: I confused adm and admin. But as long as we're on that subject, what is the intended function of each of those?

          Comment


            #6
            Re: su and sudo stopped working

            adm group has permission to monitor the system and see the logs.

            admin group gets to change the system (add hard drive partitions, printers, etc.) with root privileges.

            Longer answer here: http://www.linuxsecurity.com/resourc...to/ch8.en.html

            Comment


              #7
              Re: su and sudo stopped working

              Originally posted by dibl
              adm group has permission to monitor the system and see the logs.

              admin group gets to change the system (add hard drive partitions, printers, etc.) with root privileges.

              Longer answer here: http://www.linuxsecurity.com/resourc...to/ch8.en.html
              For what it's worth, the howto you mention doesn't say anything about admin. There's probably some interesting history as to how admin came to be.

              Comment


                #8
                Re: su and sudo stopped working

                Originally posted by pwabrahams

                For what it's worth, the howto you mention doesn't say anything about admin.
                I saw that after I posted it, but it does explain the adm group. Oddly, another pretty thorough explanation of groups here also does not list "admin":

                http://www.yolinux.com/TUTORIALS/Lin...ingGroups.html

                Oh well.

                Comment


                  #9
                  Re: su and sudo stopped working

                  admin is not a "standard" group on linux (that's why you won't find it in most universal listings), it's used in *buntus (and derivatives) to give users access to sudo.

                  Other distributions either have no corresponding group, or may have a different group for it...like "wheel" (the wheel name derives from unix tradition...being a "big wheel").

                  Comment


                    #10
                    Re: su and sudo stopped working

                    What is the "adm" group?
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment

                    Working...
                    X