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

Thread: su errors out

  1. #1
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,280

    Default su errors out

    I'm not sure if this is the correct forum category. Please move it if not.

    Somehow while installing openSUSE 12.3 64bit I damaged my 12.2 installation on a separate partition. Now when I boot into 12.2, open a console and invoke "su" i get

    HTML Code:
    :~> su
    Password: 
    su: cannot set groups: Operation not permitted
    ...and "sudo"

    HTML Code:
    > sudo ls
    sudo: effective uid is not 0, is sudo installed setuid root?
    As far as I can see the ownership of all directories at the / level has been changed from root:root to a user1:users, user1 being myself. This may have happened when I was trying to copy my home directory to the newly installed 12.3. Is there any solution to this, like "chown -R / root:root" or do I have to re-install my 12.2?

    I would normally just switch to using 12.3 except that a vital piece of emulator software does not work under 12.3 causing a total lock-up.

    Thanks for any assistance.

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,921
    Blog Entries
    2

    Default Re: su errors out

    A thought,
    Instead of trying to change to root, try logging in with root and see if you have full functionality.

    And maybe create a new User for testing, compare what is created to your existing.

    TSU

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,853

    Default Re: su errors out

    To me it looks as if something basicaly is wrong. You have no idea what you did other then the vague expression "damaged"? (dropped it from the table ........)

    The first is a bit vague. Of course using su, does not only involve changing the userid to that of root, but also the groupid. And that seems to fail. The source of it could be very diverse. But it could be the same as the second one.

    The suggestion here is that sudo is not setuid root (as it should be of course). That is easy to see with ( I show mine for comparison):
    Code:
    henk@boven:~> ls -l /usr/bin/sudo
    -rwsr-xr-x 1 root root 121240 16 jul  2012 /usr/bin/sudo
    henk@boven:~>
    The s bit should be there. You can check if the same problem is true for su:
    Code:
    henk@boven:~> ls -l /usr/bin/su
    -rwsr-xr-x 1 root root 44256 23 jan 14:04 /usr/bin/su
    henk@boven:~>
    It could also be that your (root) file system is mounted wrongly, preventing setuid root programs from being used as such. Let us see
    Code:
    mount | grep ' / '
    Last edited by hcvv; 17-Mar-2013 at 06:51.
    Henk van Velden

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,645
    Blog Entries
    14

    Default Re: su errors out

    Don't chown root:root recursively. You'll bork the system even more than it already is. If I'd see this on my system, I'd draw only one conclusion: reinstall. My bet is that reapplying your personal desires/needs to a new system is gonna take far less time and effort than repairing the individual permissions on every file and folder. For example "/home" is a folder, but the stuff in it should never be root:root. Another one: not all folders on the system are 755, not all files 644. In fact you're already experiencing the misery that comes from broken permissions.

    BTW: I don't think the 12.3 install / upgrade itself has changed the perms/mounting of the 12.2 system.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,853

    Default Re: su errors out

    Sorry, missed the last part of your original post. Yes, it seem that you did some chown there????????
    I am stronly with Knrurpht that you do not try to undo that by changing all and everything. That would be too much and make it even worse..

    Can you explain what you think the "damage" was? You must have some idea.
    Andd my last statement may still help:
    Code:
    mount | grep ' / '
    Henk van Velden

  6. #6
    dd NNTP User

    Default Re: su errors out

    On 03/17/2013 03:16 PM, Knurpht wrote:

    > I'd draw only one conclusion: reinstall.


    i agree...but, i do remember reading somewhere that there is CLI
    magic to reset all the _system_ permissions back to what they were by
    default....but i can't find it....WAIT, here it is...but, i have NO
    idea if it still works (this note is years old!!)...oh wait, you have
    to be able to log in as root! anyway, here it is....CAUTION read my
    sig caveat before proceeding:

    on a root console run the command:

    chkstat --set /etc/permissions

    and it should reset most/all of the incorrect file and directory
    permission and/or ownership problems. As an alternative, run the
    command:

    /sbin/conf.d/SuSEconfig.permissions -set

    which will do the same, but also apply the permissions set in the
    specified permission level (easy, secure, or paranoid) as well as
    those specified in the local permissions file: /etc/permissions.local
    by the way you might wanna backup all your data prior to reinstalling..

    --
    dd
    http://tinyurl.com/DD-Caveat


  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,853

    Default Re: su errors out

    There is no problem for him to login as root (e.g. from the console at Ctrl-Alt-F1), there is only a problem in using programs, specialy suid programs.
    Henk van Velden

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

    Default Re: su errors out

    On 2013-03-17 18:51, dd wrote:
    > /sbin/conf.d/SuSEconfig.permissions -set


    It has a limited effect.

    It only modifies some permissions from what was set on the original rpm
    archives. Ie, it applies some customizations.

    What has to be done first is to apply the same permissions as stored in
    the original rpms. I think I saw a trick to redo all that, but I can't
    find it.

    (My guess on what caused the problem is that the OP copied over files as
    user)

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

  9. #9
    dd NNTP User

    Default Re: su errors out

    On 03/17/2013 07:58 PM, Carlos E. R. wrote:
    > (My guess on what caused the problem is that the OP copied over files as
    > user)


    i guess he ran chown (as root) on the new 12.3 / recursively,
    thinking he was running it only against ~/home

    --
    dd


  10. #10
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,280

    Default Re: su errors out

    Quote Originally Posted by tsu2 View Post
    A thought,
    Instead of trying to change to root, try logging in with root and see if you have full functionality.

    TSU
    So far I have full functionality so it's not an immediate disaster.

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
  •