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
su: cannot set groups: Operation not permitted
> 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.
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):
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.
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:
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
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…
:~> 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.
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
>> 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
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
ion:users / home/ion
. . . but i think that would error out
when the system filed to find a directory named
(beginning with a space) like this:
chown: cannot access `
home/ion': No such file or directory