Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: su errors out

  1. #11
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,662
    Blog Entries
    14

    Default Re: su errors out

    Quote Originally Posted by dd View Post
    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
    He can't. Not everything in "/" is owned by root:root. Think CUPS, Mysql, Firebird. Even if so, he'd need to take care that nothing is mounted, like /home.
    ° 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

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

    Default Re: su errors out

    Quote Originally Posted by hcvv View Post
    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 ........)
    I think I wanted to execute "chown -R ion:users /home/ion" and perhaps executed "chown -R ion:users / home/ion". Note the space between "/" and "home/ion"


    The root directory is mounted as follows:-

    Code:
    :~> mount | grep ' / '
    /dev/sda2 on / type ext4 (rw,relatime,data=ordered)
    It looks correct to me.

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

    Default Re: su errors out

    Quote Originally Posted by Knurpht View Post
    Don't chown root:root recursively.
    Advice followed. Thanks.

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

    Default Re: su errors out

    Quote Originally Posted by ionmich View Post
    I think I wanted to execute "chown -R ion:users /home/ion" and perhaps executed "chown -R ion:users / home/ion". Note the space between "/" and "home/ion"
    It looks correct to me.
    If so, it's that space char that killed your system. It changed the perms of "/" to ion:users. The "-R" takes care that nothing below "/" is forgotten.
    ° 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. #15
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,280

    Default Re: su errors out

    Thanks everyone for the many responses. I invoked

    Code:
    chown root:root /usr/bin/su
    and
    Code:
    chmod u+s /usr/bin/su
    so that

    Code:
    :~> ls -l /usr/bin/su
    -rwsr-xr-x 1 root root 44256 Jan 23 07:04 /usr/bin/su
    So now at least "su" is functional. I decided not to go any further as I am currently migrating to 12.3. My data is backed up to a USB drive and to a server, so I feel secure. Later I will re-install 12.2 as 12.3 doesn't like either mame/mess or Vcc running under wine. Two essential emulators running my Sculptor database.

    Thanks again.

  6. #16
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,884

    Default Re: su errors out

    Quote Originally Posted by ionmich View Post
    I think I wanted to execute "chown -R ion:users /home/ion" and perhaps executed "chown -R ion:users / home/ion". Note the space between "/" and "home/ion"
    When you do not post within CODE tags, we will not realy see that space . But I will believe you. And that is it possibly.

    Quote Originally Posted by ionmich View Post
    The root directory is mounted as follows:-

    Code:
    :~> mount | grep ' / '
    /dev/sda2 on / type ext4 (rw,relatime,data=ordered)
    It looks correct to me.
    Nothing strange here. But we already decided that the cause is the (useless?) chmod.

    I guess a reinstall is best. You seem to think that this is not serious, but IMHO you have a lot of booby traps in the system now.
    Henk van Velden

  7. #17
    dd NNTP User

    Default Re: su errors out

    On 03/17/2013 10:06 PM, Knurpht wrote:
    >
    > dd;2536856 Wrote:
    >> 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
    >>

    >
    > He can't. Not everything in "/" is owned by root:root. Think CUPS,
    > Mysql, Firebird. Even if so, he'd need to take care that nothing is
    > mounted, like /home.


    perhaps i do not understand but i was writing in past tense, and
    speculating (as was Carlos, whose post i replied to and quoted) on
    how this problem arose (not how to fix it)...and i guessed the OP ran
    as root
    Code:
    chown -R user1:users
    while in / rather than in
    /home/user1 and thereby spoiled his system...

    OH! reading ahead i see the OP now speculates he ran
    Code:
    chown -R
    ion:users / home/ion
    . . . but i _think_ that would error out
    when the system filed to find a directory named
    Code:
    / home
    (beginning with a space) like this:
    Code:
    chown: cannot access `
    home/ion': No such file or directory
    but, as said: perhaps i do not understand..

    --
    dd

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

    Default Re: su errors out

    On 2013-03-18 10:22, dd wrote:
    > OH! reading ahead i see the OP now speculates he ran
    Code:
    chown -R
    > ion:users / home/ion
    . . . but i _think_ that would error out
    > when the system filed to find a directory named
    Code:
    / home
    > (beginning with a space) like this:
    Code:
    chown: cannot access `
    > home/ion': No such file or directory


    Yes, but that would happen after it acts on the "/" part.

    I'm not willing to try on my system and see what happens ;-)

    --
    Cheers / Saludos,

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

Page 2 of 2 FirstFirst 12

Posting Permissions

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