Announcement

Collapse
No announcement yet.

Locked out of administrator mode

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

    Locked out of administrator mode

    Suddenly, I can't access any settings any more. Whenever I go to System Settings to change something, I click Administrator Mode and it asks me for my password. After I enter it, the border in the window changes to red as it did before, but then quickly disappears and I cannot edit anything. It consistently stops asking for my password at all but doesn't give me access to anything, sudo -k makes the password prompt return but still doesn't allow me access. I can't even use sudo commands in Konsole, as it doesn't ask for my password, but then doesn't do anything I type.

    #2
    Re: Locked out of administrator mode

    What is the output of:

    Code:
    groups
    Here is mine:

    michael@racing:~$ groups
    michael adm dialout cdrom floppy audio dip video plugdev scanner lpadmin netdev powerdev admin

    The important one is admin. sudo works for all users who are added to the admin group. Additionally the /etc/sudoers file may be broken. To fix that you will have to reboot into the Recovery Mode and use the command 'visudo'. Recovery mode boots to a command prompt with root access.

    Here is what mine looks like:

    # /etc/sudoers
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # See the man page for details on how to write a sudoers file.
    # Defaults

    Defaults !lecture,tty_tickets,!fqdn

    # Uncomment to allow members of group sudo to not need a password
    # %sudo ALL=NOPASSWD: ALL

    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # User privilege specification
    root ALL=(ALL) ALL

    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL


    Here are some commands you will need for vi.

    CTRL-o to save changes, press <Enter> after

    CTRL-x to exit

    Mike
    http://monte48lowes.blogspot.com

    Comment


      #3
      Re: Locked out of administrator mode

      Originally posted by monte48lowes
      The important one is admin. sudo works for all users who are added to the admin group.
      Interesting, you're right, I'm not in the admin group. I wonder how I got moved out of it.

      jeff@jeff-laptop:~$ groups
      jeff adm dialout cdrom floppy audio dip video plugdev scanner lpadmin netdev powerdev

      How do I go about adding myself back to it without admin access?

      Comment


        #4
        Re: Locked out of administrator mode

        Reboot into Recovery Mode:

        Code:
        usermod -a -G admin jeff
        Mike
        http://monte48lowes.blogspot.com

        Comment


          #5
          [Solved] Locked out of administrator mode

          That did it, thanks.

          Comment

          Working...
          X