Announcement

Collapse
No announcement yet.

Sudo ... again!

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

    Sudo ... again!

    Ok, i know that there are more than one topic about sudo problems, but in all of these (yes, i've made a search!!!) i'm unable to find a REAL solution to my problem that is: as normal user my password isn't recognised by sudo. How can i reset sudo policies/restrictions/whatever to add my normal user to sudo granted users?

    My sudoers file:
    -----------------------------------------------------------------------------------------------------
    /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.
    #

    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # Defaults

    Defaults !lecture,tty_tickets,!fqdn,timestamp_timeout=0

    # User privilege specification
    root ALL=(ALL) ALL

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

    My normal user is part of 'sudo' group (not in admin group and i dont want it in the admin group) but it has no effect.

    Thanks

    #2
    Re: Sudo ... again!

    I'm no guru on system administration, but I've had the strong impression for a long time that only members of the admin group can do administrative (aka root aka sudo) functions on the system.

    Comment


      #3
      Re: Sudo ... again!

      Guys, only way to have sudo functioning is add my user to admin group?

      Comment


        #4
        Re: Sudo ... again!

        YES, AFAIK, for the user.

        However, there is another approach. Your user can enter
        Code:
        sudo su
        and then give the root password, and "become" root for that session. The
        Code:
        exit
        command takes him back to user status. Commands issued while he is in root mode need not be prefixed by "sudo", since he already is root.

        It's not a recommended method, because you only have to forget you are root long enough to do a couple of file operations in your user folder, and your system will be hosed up thoroughly. But if you're careful, and stay away from user data, it works OK.

        Comment


          #5
          Re: Sudo ... again!

          Originally posted by Boboz
          Guys, only way to have sudo functioning is add my user to admin group?
          It's the simplest way, but you can also add your username to /etc/sudoers explicitly.
          Add a line like this to enable sudo for your user:
          your_username ALL=(ALL) ALL

          (It's also possible to fine tune sudo permissions if need be, see 'man sudoers' for details)

          Comment

          Working...
          X