Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Sudo not working in Konsole

  1. #1
    Join Date
    Jul 2011
    Location
    India
    Posts
    81

    Default Sudo not working in Konsole

    Hi all, Greetings,I am using opensuse 12.1 with kde 4 Whenever I use sudo + command in konsole, it returns a error. I have to go into superuser mode (su and then give password ) and then only run the desired command.For example, here is the example to run wvdial.
    Code:
    anish@linux-jmbg:~> sudo wvdialsudo: /usr/lib/sudo/sudoers.so must be only be writable by ownersudo: fatal error, unable to load pluginsanish@linux-jmbg:~> suPassword: linux-jmbg:/home/anish # wvdial--> WvDial: Internet dialer version 1.60--> Initializing modem--> Sending: ATZ
    Kindly help me to fix this. TIA.
    Religion is just another habit of human race.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,240

    Default Re: Sudo not working in Konsole

    The use of the CODE tags is for preserving the layout you get in the original. It seems that you lost newlines in this case. Did you realy copy/pasted the output from the terminal emulator directly between the CODE tags.

    Also you seem to think that sudo is not to get into "supersuer mode". But sudo is just another way of becoming the superuser (root).

    Whenever you use su (not only in this case where it seems to be afall back for you), then use
    Code:
    su -
    do not forget that minus sign.

    When I read the message you post trying to guess where some new lines should and spaces were in the original, I think the main error message is:
    Code:
    sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo
    which would lead me top check that with
    Code:
    ls -l /usr/lib/sudo/sudoers.so
    Please do so and post the result here.
    Henk van Velden

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Sudo not working in Konsole

    On 2012-05-01 14:26, hcvv wrote:

    > Code:
    > --------------------
    > sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo
    > --------------------


    And who changed that file?

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  4. #4
    Join Date
    Jul 2011
    Location
    India
    Posts
    81

    Default Re: Sudo not working in Konsole

    @hcvv: Hi, I copy pasted the code you gave: the result:
    Code:
    anish@linux-jmbg:~> ls -l /usr/lib/sudo/sudoers.so
    -rwxrwxrwx 1 root root 211240 Jan 31 14:29 /usr/lib/sudo/sudoers.so
    anish@linux-jmbg:~>
    Since new lines didnt appear in that previous post, here I repaste the problem again
    Code:
    anish@linux-jmbg:~> sudo wvdialsudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
    sudo: fatal error, unable to load plugins
    anish@linux-jmbg:~>
    @Robin: Who changed that file? -> I dont know what you mean. I havent even seen that file in my system.
    Religion is just another habit of human race.

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

    Default Re: Sudo not working in Konsole

    As you see the file is also writable by the group and the world. sudo does see this as a violation of security and thus gives the error message and quits. This is my explanation, seeing the error message and checking if that error message tells the truth (which is the case).

    I however must add that I did not look into it using any further sudo knowledge (which is llimited in my person because I almost never use it). On my 11.4 system that file is not even present at all!

    @Carlos points to the fact that when sudo fails on these sorts of security checks, it is most likely that somebody (as root) changed things in the sudo configuration/environment manualy, not using the appropriate tools. He does implicitly (but he is never very talkative in his answers/suggestion) suggest you to ask yourself when and how you did something to configure/change anything that may have influence onn sudo.

    My question now would be the same as Carlos implicit one: what did you (try to) change to sudo?
    Second, maybe someone comes and can telll more about this file in particular.

    BTW, this is the contents of my /usr/lib/sudo/:
    Code:
    boven:~ # ls -l /usr/lib/sudo/
    total 20
    -rwxr-xr-x 1 root root 5684 Jan  5 17:20 sesh
    -rwxr-xr-x 1 root root 9556 Jan  5 17:20 sudo_noexec.so
    boven:~ #
    As you see all there is only writable for the owner (root).
    Henk van Velden

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Sudo not working in Konsole

    On 2012-05-08 10:26, hcvv wrote:

    > @Carlos points to the fact that when -sudo- fails on these sorts of
    > security checks, it is most likely that somebody (as -root-) changed
    > things in the -sudo- configuration/environment manualy, not using the
    > appropriate tools. He does implicitly (but he is never very talkative in
    > his answers/suggestion) suggest you to ask yourself when and how you did
    > something to configure/change anything that may have influence onn
    > -sudo.-
    >
    > My question now would be the same as Carlos implicit one: what did you
    > (try to) change to -sudo-?


    Thank you - I couldn't have explained it better :-)

    And his answer confuses me, because he says “I havent
    even seen that file in my system.” - when he obviously has that file as the
    ls output a paragraph above shows.

    So, being a bit paranoid, at this point I would think the OP has been hacked.

    > Second, maybe someone comes and can telll more about this file in
    > particular.


    I have no idea, that file is new in 12.1, 11.4 doesn't have it. And
    obviously sudo does a sanity check on itself, it fails, and aborts execution.

    > As you see all there is only writable for the owner (-root)-.


    Right. It is possible to run "rpm --verify sudo" and see what more has
    changed - unless sudo has been reinstalled from another rpm source.


    I remember a recent post where somebody did something to his filesystem and
    the result was that every file changed ownership to a certain user, and
    what he did was chown back everything to root. I wondered if it was the OP,
    but no, I think not. But something weird is going on there, changing
    permissions of security critical libraries.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,240

    Default Re: Sudo not working in Konsole

    I remember a recent post where somebody did something to his filesystem and
    the result was that every file changed ownership to a certain user, and
    what he did was chown back everything to root.
    Sorry, I should not do that.

    Yes, that has happened in the history of Unix/Linux a lot of times by system managers not understanding much of it. The same happend to those by incident (un)setting certain access bits through all of the system and then reversing that for all files in the system. Let us hope this is not the case here.
    Henk van Velden

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

    Default Re: Sudo not working in Konsole

    Back to the problem. I suddenly realize that I have a 12.1 installation on line. That means I can mount that root partition and look in it. The result:
    Code:
    boven:/mnt/B/usr/lib/sudo # l
    total 300
    drwxr-xr-x   2 root root   4096 Mar  6 12:04 ./
    drwxr-xr-x 157 root root  73728 Mar  6 12:09 ../
    -rwxr-xr-x   1 root root   5640 Jan 31 09:53 sesh*
    -rwxr-xr-x   1 root root   9556 Jan 31 09:53 sudo_noexec.so*
    -rwxr-xr-x   1 root root 202912 Jan 31 09:53 sudoers.so*
    boven:/mnt/B/usr/lib/sudo #
    This show that @thinkanish's system is broken.

    Now, you can of course easily remove those two w bits, but it is realy important to find out how this happened. If this happened, there can be more on the system. And when you can not pinpoint how this happened (and repair it thouroughly), a reinstall of sudo would be the minimum, but a complete reinstall might be better (depending on the security you ask from your system).

    Over to you thinkanish.
    Last edited by hcvv; 08-May-2012 at 04:45.
    Henk van Velden

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Sudo not working in Konsole

    On 2012-05-08 13:46, hcvv wrote:
    >
    >> I remember a recent post where somebody did something to his filesystem and
    >> the result was that every file changed ownership to a certain user, and
    >> what he did was chown back everything to root.

    > Sorry, I should not do that.
    >
    > Yes, that has happened in the history of Unix/Linux a lot of times by
    > system managers not understanding much of it. The same happend to those
    > by incident (un)setting certain access bits through all of the system
    > and then reversing that for all files in the system. Let us hope this is
    > not the case here.


    It can be accidental. If I remember correctly, the admin used a system
    command (change user?) to change the UID of some user and all his home
    files. So far, so good. The problem was that that system user (not his
    direct doing) listed "/" as being the home directory - so it applied the
    change to the entire filesystem. Every file resulted owned by that user,
    and the root cause is the wrong definition of the home directory of a
    system user (ie, one created by an rpm package). A bug, IMO.

    The problem, of course, is how to revert the damage. One is reinstall.
    Another is via rpm --verify, I think there is a method to redo permissions,
    and if not, it can be scripted. Another is install another system in
    parallel, and compare permissions.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  10. #10
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,069
    Blog Entries
    15

    Default Re: Sudo not working in Konsole

    Quote Originally Posted by Carlos E. R.
    On 2012-05-08 13:46, hcvv wrote:
    The problem, of course, is how to revert the damage. One is reinstall.
    Another is via rpm --verify, I think there is a method to redo
    permissions, and if not, it can be scripted. Another is install another
    system in parallel, and compare permissions.
    Hi
    Nah, much simpler to run chkstat....

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
    up 3 days 10:58, 4 users, load average: 0.04, 0.03, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


Page 1 of 3 123 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
  •