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

Thread: why sudo asking for root password?

  1. #1

    Default why sudo asking for root password?

    I just installed 11.3 32b, added myself to the sudoers files, but when I sudo it asks me for root password and not my password, what am I doing wrong?
    I remember when setting my password during installation I unselected something like "use this password for system administration".

    shalom@shalom-laptop:~> sudo zypper up
    root's password:

  2. #2
    Join Date
    Nov 2009
    Location
    Mnchen
    Posts
    295

    Default Re: why sudo asking for root password?

    How did you add yourself to sudoers files?

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,385

    Default Re: why sudo asking for root password?

    From your post I have the idea that you are used to a different distribution. It that true?

    Of course you should never have the same password for root and for any of your normal users.

    Also I refer to: http://en.opensuse.org/SDB:Login_as_roo
    Henk van Velden

  4. #4

    Default Re: why sudo asking for root password?

    hcvv, I've used opensuse 11.2 for the past four month, but yes, I'm more used to ubuntu.

    anyway , I commented those two lines in the sudoers file and now I'm good:
    #Defaults targetpw # ask for the password of the target user i.e. root
    #ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!

    is that the right solution?

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,385

    Default Re: why sudo asking for root password?

    There are two levels of "right" solution:

    When it does what you want, then this is the right solution for you.

    When you think it is "right" not to ask for the root paassword in the moment you are going to do something as root, I am not with you. I have seen to much instances of system managers cutting their fingers off (inclusdng myself in more then 20 years of Unix system management) even when a password is asked for.
    Henk van Velden

  6. #6

    Default Re: why sudo asking for root password?

    I agree with you , but as this is my desktop and not a machine used by others I really think there is not much difference as long as both those passwords are known only to me and are safe.

  7. #7
    Join Date
    Jun 2010
    Location
    Bedfordshire, United Kingdom
    Posts
    116

    Default Re: why sudo asking for root password?

    Quote Originally Posted by shalom938 View Post
    hcvv, I've used opensuse 11.2 for the past four month, but yes, I'm more used to ubuntu.

    anyway , I commented those two lines in the sudoers file and now I'm good:
    #Defaults targetpw # ask for the password of the target user i.e. root
    #ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!

    is that the right solution?
    Yes. Asking for the root password is the only sensible action an unconfigured sudo can take.

    Removing the targetpw and ALL line restores the "normal" behaviour for sudo by asking for the invoking user's password.

    The essence of correctly using sudo is to create rules which specify precisely what a user may do with root privileges.

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,385

    Default Re: why sudo asking for root password?

    Quote Originally Posted by shalom938 View Post
    I agree with you , but as this is my desktop and not a machine used by others I really think there is not much difference as long as both those passwords are known only to me and are safe.
    I think you got me wrong. Of course one should protect against "other" users then the uer who happens also to be the system manager. But thinking that when there are none of those others (and also being pretty sure there never will be, no guests, no friend will ever ask if (s)he may use the system) you do not need such a protection is wrong. I though I made it rather clear, that you should proptect againt YOURSELF! (see the above about 20 years of experience).

    And you are not connected to the Internet? The scenario that somebody might lay hand on your userid/password will be less worse if that person can still not become root. The root password being something that you not not use that often and thus is less likely to be seen.

    But it is all up to you, you can even organise for a complete passwordless/firewallless system.
    Henk van Velden

  9. #9

    Default Re: why sudo asking for root password?

    I get you , and agree I should protect against muself,

    Quote Originally Posted by hcvv View Post
    The root password being something that you not not use that often and thus is less likely to be seen.
    I use sudo a lot, and I don't see a difference in typing the root's password or my password while making a mistake , I wil make the mistake anyway. but then, I don't have 20 years experience with linux, I use linux only for the past year or two.

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,385

    Default Re: why sudo asking for root password?

    When you sudo a lot, either something is wrong with your system or you are doing sort of operating system testing.
    Most people use their system for mail, music, office work, movie editing, games, all sorts of hobbys and thus want a stable system and thus want to do the least possible amount of system managent. Only security updates and backups come to my mind as regular tasks then.
    Henk van Velden

Page 1 of 2 12 LastLast

Posting Permissions

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