sudo problems

Hello everybody.

I have been using openSUSE in my desktop pc since few months so I am not really an expert in it.
I have run through a problem and I would appreciate any help:

Accidentaly I changed the permissions of different files in the root (/) directory.
As a direct result the sudo privileges, accessible until that moment by my user, disappeared.
In fact if I tried using “sudo zypper refresh” for example I got as answer:
“sudo: /etc/sudoers is owned by goupid 100, should be 0”

I have recovered the possibility to access these privileges by the command line using this commands from the root account:

chown root:root /etc/sudoers
chmod 0440 /etc/sudoers
restart computer

Now I get back the privileges if I work through the terminal whereas I am not able to access YaST2 (with the password for my user). Can you help me with that?

Are there other particular files I need to restore with any particular attribute in the root directory?

Thank you in advance for your help

Best Regards

Wizard847

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The /etc/sudoers file is probably in the / partition but is not directly
in / (because it’s under /etc) so when you changed things in / did you do
so recursively? If so you may be in for a lot of “fun” in resolving this
throughout the filesystem. What, specifically, happens when you try to
load YaST2 currently from the GUI? What does the output of the following
commands return?

rpm -V sudo
rpm -qa | grep -i yast | xargs rpm -V

Good luck.

On 09/13/2010 08:26 AM, Wizard847 wrote:
>
> Hello everybody.
>
> I have been using openSUSE in my desktop pc since few months so I am
> not really an expert in it.
> I have run through a problem and I would appreciate any help:
>
> Accidentaly I changed the permissions of different files in the root
> (/) directory.
> As a direct result the sudo privileges, accessible until that moment by
> my user, disappeared.
> In fact if I tried using “sudo zypper refresh” for example I got as
> answer:
> “sudo: /etc/sudoers is owned by goupid 100, should be 0”
>
> I have recovered the possibility to access these privileges by the
> command line using this commands from the root account:
>
> chown root:root /etc/sudoers
> chmod 0440 /etc/sudoers
> restart computer
>
> Now I get back the privileges if I work through the terminal whereas I
> am not able to access YaST2 (with the password for my user). Can you
> help me with that?
>
> Are there other particular files I need to restore with any particular
> attribute in the root directory?
>
> Thank you in advance for your help
>
> Best Regards
>
> Wizard847
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMjjjYAAoJEF+XTK08PnB5htIP/itFjGd3VqjUHgB1xfOgyMDi
+V+We6tNTM0qaf7T64AbJR1VbW9zTv4jjjRkuxB4ziIXkGU4AjdLwbFDIKRrlplJ
fY7hsYpANlY8cBYjYFkdYBZbiQT7KodX+YBLCJJcNMIGvEwXyf2URem8FP+HRvID
dcjOFYz0gzPI4/Dnjhyrtf51PALxsYu0Sng+ct2YTra3BaZvzB7O/Y98p2N4kOJ8
3yPDS7WXKe8D8M0tKO6uVYkMDTrrgZP2e66+xes1+2YJFXefCGGuEKeZZMlDXXHl
2wx6xKwZXRSgcvbs2rOsCLOP6ufxdpYh7zT0lhdY/m/agK55buIzgfb3Vk0rBcpb
kWqedrxpHtrbuRv/Pb1v+vxZIXojQuOuybo73d3UBihFen3sWFtzTdvxV4X9iB+P
RiR+DbWpB1O36ZTTvI50+5ZLfa28Y4j8WTLDMNyqHhR3jmmxsXjToODw6tig7RjP
Wv4yP25Tr5g/sy8c7INmaS37BGziC3W6HOw4yuS2KvLamHpAFKIt/1KKUqxeNnuO
mWC8yInKbxOUOR6tvUqjMmDArSt/XafrcnRFmZpR7zjwxOKOVMZOSgjpH6KJGp1f
okhSyRs0DyQIHb4EOP4Ta6xEewdkhL9WCjH39B4uCjDRI+ciLCZFcb6FLbE6CZbb
EKy1TRKe/MBEOO93qrMx
=Y/bY
-----END PGP SIGNATURE-----

Thank you very much for your answer.
In fact the situation is not happy at all.

I realized I have some problems also in reading data from CD and in mounting usb disks.
The system sys that there is something wrong with HAL daemon.
I wonder if this mess comes also from the on-line upgrade from 11.2 → 11.3 that I did few days ago…

Here is the output of the two commands you asked:

rpm -V sudo > file
…?.. c /etc/sudoers
…G… /usr/share/doc/packages/sudo
…G… d /usr/share/doc/packages/sudo/HISTORY
…G… d /usr/share/doc/packages/sudo/LICENSE
…G… d /usr/share/doc/packages/sudo/PORTING
…G… d /usr/share/doc/packages/sudo/README
…G… d /usr/share/doc/packages/sudo/README.LDAP
…G… d /usr/share/doc/packages/sudo/README.SUSE
…G… d /usr/share/doc/packages/sudo/TROUBLESHOOTING
…G… d /usr/share/doc/packages/sudo/UPGRADE
…G… d /usr/share/doc/packages/sudo/WHATSNEW
…G… d /usr/share/doc/packages/sudo/sudo.pod
…G… d /usr/share/doc/packages/sudo/sudoers.ldap.pod
…G… d /usr/share/doc/packages/sudo/sudoers.pod
…G… d /usr/share/doc/packages/sudo/visudo.pod
…G… d /usr/share/man/man5/sudoers.5.gz
…G… d /usr/share/man/man5/sudoers.ldap.5.gz
…G… d /usr/share/man/man8/sudo.8.gz
…G… d /usr/share/man/man8/sudoedit.8.gz
…G… d /usr/share/man/man8/visudo.8.gz

rpm -qa | grep -i yast | xargs rpm -V >> file
…G… /usr/lib64/libyui.so.3
…G… /usr/lib64/libyui.so.3.0.0
…G… /usr/share/YaST2/clients/ntp-client.ycp
…G… /usr/share/YaST2/clients/ntp-client_auto.ycp
…G… /usr/share/YaST2/clients/ntp-client_finish.ycp
…G… /usr/share/YaST2/clients/ntp-client_proposal.ycp
…G… /usr/share/YaST2/data/ntp_servers.ycp
…G… /usr/share/YaST2/include/ntp-client
…G… /usr/share/YaST2/include/ntp-client/clocktypes.ycp
…G… /usr/share/YaST2/include/ntp-client/commandline.ycp
…G… /usr/share/YaST2/include/ntp-client/dialogs.ycp
…G… /usr/share/YaST2/include/ntp-client/helps.ycp
…G… /usr/share/YaST2/include/ntp-client/misc.ycp
…G… /usr/share/YaST2/include/ntp-client/widgets.ycp
…G… /usr/share/YaST2/include/ntp-client/wizards.ycp
…G… /usr/share/YaST2/modules/NtpClient.ybc
…G… /usr/share/YaST2/modules/NtpClient.ycp
…G… /usr/share/YaST2/schema/autoyast/rnc/ntpclient.rnc
…G… /usr/share/YaST2/scrconf/cfg_ntp.scr
…G… /usr/share/YaST2/scrconf/etc_ntp.scr
…G… /usr/share/applications/YaST2/ntp-client.desktop
…G… /usr/share/doc/packages/yast2-ntp-client
…G… d /usr/share/doc/packages/yast2-ntp-client/COPYING
…G… d /usr/share/doc/packages/yast2-ntp-client/README
…G… d /usr/share/doc/packages/yast2-ntp-client/TODO
…G… /usr/share/doc/packages/yast2-ntp-client/autodocs
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/NtpClient.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/NtpClient.mod.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/clocktypes.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/commandline.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/dialogs.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/files.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/helps.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/index.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/intro.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/misc.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client_auto.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client_finish.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client_proposal.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/widgets.html
…G… d /usr/share/doc/packages/yast2-ntp-client/autodocs/wizards.html
…G… d /usr/share/doc/packages/yast2-ntp-client/ntp.conf_agent.txt
…G… d /usr/share/doc/packages/yast2-ntp-client/spec.txt
…G… /usr/share/YaST2/clients/bootloader.ycp
…G… /usr/share/YaST2/clients/bootloader_auto.ycp
…G… /usr/share/YaST2/clients/bootloader_finish.ycp
…G… /usr/share/YaST2/clients/bootloader_preupdate.ycp
…G… /usr/share/YaST2/clients/bootloader_proposal.ycp
…G… /usr/share/YaST2/clients/inst_bootloader.ycp
…G… /usr/share/YaST2/clients/inst_lilo_convert.ycp
…G… /usr/share/YaST2/clients/print-product.ycp
…G… /usr/share/YaST2/include/bootloader
…G… /usr/share/YaST2/include/bootloader/elilo
…G… /usr/share/YaST2/include/bootloader/elilo/dialogs.ycp
…G… /usr/share/YaST2/include/bootloader/elilo/helps.ycp
…G… /usr/share/YaST2/include/bootloader/elilo/options.ycp
…G… /usr/share/YaST2/include/bootloader/elilo/widgets.ycp
…G… /usr/share/YaST2/include/bootloader/grub
…G… /usr/share/YaST2/include/bootloader/grub/dialogs.ycp
…G… /usr/share/YaST2/include/bootloader/grub/helps.ycp
…G… /usr/share/YaST2/include/bootloader/grub/misc.ycp
…G… /usr/share/YaST2/include/bootloader/grub/options.ycp
…G… /usr/share/YaST2/include/bootloader/lilo
…G… /usr/share/YaST2/include/bootloader/ppc
…G… /usr/share/YaST2/include/bootloader/ppc/dialogs.ycp
…G… /usr/share/YaST2/include/bootloader/ppc/helps.ycp
…G… /usr/share/YaST2/include/bootloader/ppc/options.ycp
…G… /usr/share/YaST2/include/bootloader/routines
…G… /usr/share/YaST2/include/bootloader/routines/autoinstall.ycp
…G… /usr/share/YaST2/include/bootloader/routines/common_helps.ycp
…G… /usr/share/YaST2/include/bootloader/routines/common_options.ycp
…G… /usr/share/YaST2/include/bootloader/routines/dialogs.ycp
…G… /usr/share/YaST2/include/bootloader/routines/global_widgets.ycp
…G… /usr/share/YaST2/include/bootloader/routines/helps.ycp
…G… /usr/share/YaST2/include/bootloader/routines/i386.ycp
…G… /usr/share/YaST2/include/bootloader/routines/lib_iface.ycp
…G… /usr/share/YaST2/include/bootloader/routines/lilolike.ycp
…G… /usr/share/YaST2/include/bootloader/routines/misc.ycp
…G… /usr/share/YaST2/include/bootloader/routines/popups.ycp
…G… /usr/share/YaST2/include/bootloader/routines/section_helps.ycp
…G… /usr/share/YaST2/include/bootloader/routines/section_widgets.ycp
…G… /usr/share/YaST2/include/bootloader/routines/switcher.ycp
…G… /usr/share/YaST2/include/bootloader/routines/wizards.ycp
…G… /usr/share/YaST2/include/bootloader/zipl
…G… /usr/share/YaST2/include/bootloader/zipl/helps.ycp
…G… /usr/share/YaST2/modules/BootArch.ybc
…G… /usr/share/YaST2/modules/BootArch.ycp
…G… /usr/share/YaST2/modules/BootCommon.ybc
…G… /usr/share/YaST2/modules/BootCommon.ycp
…G… /usr/share/YaST2/modules/BootELILO.ybc
…G… /usr/share/YaST2/modules/BootELILO.ycp
…G… /usr/share/YaST2/modules/BootGRUB.ybc
…G… /usr/share/YaST2/modules/BootGRUB.ycp
…G… /usr/share/YaST2/modules/BootLILO.ybc
…G… /usr/share/YaST2/modules/BootLILO.ycp
…G… /usr/share/YaST2/modules/BootPOWERLILO.ybc
…G… /usr/share/YaST2/modules/BootPOWERLILO.ycp
…G… /usr/share/YaST2/modules/BootStorage.ybc
…G… /usr/share/YaST2/modules/BootStorage.ycp
…G… /usr/share/YaST2/modules/BootSupportCheck.ybc
…G… /usr/share/YaST2/modules/BootSupportCheck.ycp
…G… /usr/share/YaST2/modules/BootZIPL.ybc
…G… /usr/share/YaST2/modules/BootZIPL.ycp
…G… /usr/share/YaST2/modules/Bootloader.ybc
…G… /usr/share/YaST2/modules/Bootloader.ycp
…G… /usr/share/YaST2/modules/Bootloader_API.pm
…G… /usr/share/YaST2/modules/GfxMenu.ybc
…G… /usr/share/YaST2/modules/GfxMenu.ycp
…G… /usr/share/YaST2/schema/autoyast/rnc/bootloader.rnc
…G… /usr/share/YaST2/scrconf/bootloader.scr
…G… /usr/share/YaST2/scrconf/cfg_bootloader.scr
…G… /usr/share/YaST2/scrconf/cfg_bootsplash.scr
…G… /usr/share/applications/YaST2/bootloader.desktop
…G… /usr/share/doc/packages/yast2-bootloader
…G… d /usr/share/doc/packages/yast2-bootloader/COPYING
…G… d /usr/share/doc/packages/yast2-bootloader/README
…G… /usr/share/doc/packages/yast2-bootloader/autodocs
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootArch.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootArch.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootCommon.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootCommon.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootELILO.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootELILO.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootGRUB.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootGRUB.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootLILO.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootLILO.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootPOWERLILO.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootPOWERLILO.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootStorage.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootStorage.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootSupportCheck.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootSupportCheck.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootZIPL.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/BootZIPL.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/Bootloader.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/Bootloader.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/GfxMenu.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/GfxMenu.mod.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/autoinstall.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_auto.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_finish.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_preupdate.html
…G… d /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_proposal.html
… Then the output continues but it is too long to be fully included in the message

Best Regards

Wizard847

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If your entire filesystem is munged like this then you may be better off
running through an install choosing to NOT FORMAT your /home partition.
If group-ownership is all that is a problem we can try to work through
these but, for example, both of those commands returned a combined total
of one line (the first one you show there for the ‘sudo’ package).

Here are a couple commands to change THESE packages’ files
group-ownerships; use at your own risk:

rpm -ql sudo > yastfiles.txt
rpm -qa | grep -i yast | xargs rpm -ql >> yastfiles.txt
for i in cat yastfiles.txt ; do chgrp root $i; done

Run the the last bit as root.

Good luck.

On 09/13/2010 10:36 AM, Wizard847 wrote:
>
> Thank you very much for your answer.
> In fact the situation is not happy at all.
>
> I realized I have some problems also in reading data from CD and in
> mounting usb disks.
> The system sys that there is something wrong with HAL daemon.
> I wonder if this mess comes also from the on-line upgrade from 11.2 →
> 11.3 that I did few days ago…
>
> Here is the output of the two commands you asked:
>
> rpm -V sudo > file
> …?.. c /etc/sudoers
> …G… /usr/share/doc/packages/sudo
> …G… d /usr/share/doc/packages/sudo/HISTORY
> …G… d /usr/share/doc/packages/sudo/LICENSE
> …G… d /usr/share/doc/packages/sudo/PORTING
> …G… d /usr/share/doc/packages/sudo/README
> …G… d /usr/share/doc/packages/sudo/README.LDAP
> …G… d /usr/share/doc/packages/sudo/README.SUSE
> …G… d /usr/share/doc/packages/sudo/TROUBLESHOOTING
> …G… d /usr/share/doc/packages/sudo/UPGRADE
> …G… d /usr/share/doc/packages/sudo/WHATSNEW
> …G… d /usr/share/doc/packages/sudo/sudo.pod
> …G… d /usr/share/doc/packages/sudo/sudoers.ldap.pod
> …G… d /usr/share/doc/packages/sudo/sudoers.pod
> …G… d /usr/share/doc/packages/sudo/visudo.pod
> …G… d /usr/share/man/man5/sudoers.5.gz
> …G… d /usr/share/man/man5/sudoers.ldap.5.gz
> …G… d /usr/share/man/man8/sudo.8.gz
> …G… d /usr/share/man/man8/sudoedit.8.gz
> …G… d /usr/share/man/man8/visudo.8.gz
>
> rpm -qa | grep -i yast | xargs rpm -V >> file
> …G… /usr/lib64/libyui.so.3
> …G… /usr/lib64/libyui.so.3.0.0
> …G… /usr/share/YaST2/clients/ntp-client.ycp
> …G… /usr/share/YaST2/clients/ntp-client_auto.ycp
> …G… /usr/share/YaST2/clients/ntp-client_finish.ycp
> …G… /usr/share/YaST2/clients/ntp-client_proposal.ycp
> …G… /usr/share/YaST2/data/ntp_servers.ycp
> …G… /usr/share/YaST2/include/ntp-client
> …G… /usr/share/YaST2/include/ntp-client/clocktypes.ycp
> …G… /usr/share/YaST2/include/ntp-client/commandline.ycp
> …G… /usr/share/YaST2/include/ntp-client/dialogs.ycp
> …G… /usr/share/YaST2/include/ntp-client/helps.ycp
> …G… /usr/share/YaST2/include/ntp-client/misc.ycp
> …G… /usr/share/YaST2/include/ntp-client/widgets.ycp
> …G… /usr/share/YaST2/include/ntp-client/wizards.ycp
> …G… /usr/share/YaST2/modules/NtpClient.ybc
> …G… /usr/share/YaST2/modules/NtpClient.ycp
> …G… /usr/share/YaST2/schema/autoyast/rnc/ntpclient.rnc
> …G… /usr/share/YaST2/scrconf/cfg_ntp.scr
> …G… /usr/share/YaST2/scrconf/etc_ntp.scr
> …G… /usr/share/applications/YaST2/ntp-client.desktop
> …G… /usr/share/doc/packages/yast2-ntp-client
> …G… d /usr/share/doc/packages/yast2-ntp-client/COPYING
> …G… d /usr/share/doc/packages/yast2-ntp-client/README
> …G… d /usr/share/doc/packages/yast2-ntp-client/TODO
> …G… /usr/share/doc/packages/yast2-ntp-client/autodocs
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/NtpClient.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/NtpClient.mod.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/clocktypes.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/commandline.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/dialogs.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/files.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/helps.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/index.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/intro.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/misc.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client_auto.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client_finish.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/ntp-client_proposal.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/widgets.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/autodocs/wizards.html
> …G… d
> /usr/share/doc/packages/yast2-ntp-client/ntp.conf_agent.txt
> …G… d /usr/share/doc/packages/yast2-ntp-client/spec.txt
> …G… /usr/share/YaST2/clients/bootloader.ycp
> …G… /usr/share/YaST2/clients/bootloader_auto.ycp
> …G… /usr/share/YaST2/clients/bootloader_finish.ycp
> …G… /usr/share/YaST2/clients/bootloader_preupdate.ycp
> …G… /usr/share/YaST2/clients/bootloader_proposal.ycp
> …G… /usr/share/YaST2/clients/inst_bootloader.ycp
> …G… /usr/share/YaST2/clients/inst_lilo_convert.ycp
> …G… /usr/share/YaST2/clients/print-product.ycp
> …G… /usr/share/YaST2/include/bootloader
> …G… /usr/share/YaST2/include/bootloader/elilo
> …G… /usr/share/YaST2/include/bootloader/elilo/dialogs.ycp
> …G… /usr/share/YaST2/include/bootloader/elilo/helps.ycp
> …G… /usr/share/YaST2/include/bootloader/elilo/options.ycp
> …G… /usr/share/YaST2/include/bootloader/elilo/widgets.ycp
> …G… /usr/share/YaST2/include/bootloader/grub
> …G… /usr/share/YaST2/include/bootloader/grub/dialogs.ycp
> …G… /usr/share/YaST2/include/bootloader/grub/helps.ycp
> …G… /usr/share/YaST2/include/bootloader/grub/misc.ycp
> …G… /usr/share/YaST2/include/bootloader/grub/options.ycp
> …G… /usr/share/YaST2/include/bootloader/lilo
> …G… /usr/share/YaST2/include/bootloader/ppc
> …G… /usr/share/YaST2/include/bootloader/ppc/dialogs.ycp
> …G… /usr/share/YaST2/include/bootloader/ppc/helps.ycp
> …G… /usr/share/YaST2/include/bootloader/ppc/options.ycp
> …G… /usr/share/YaST2/include/bootloader/routines
> …G…
> /usr/share/YaST2/include/bootloader/routines/autoinstall.ycp
> …G…
> /usr/share/YaST2/include/bootloader/routines/common_helps.ycp
> …G…
> /usr/share/YaST2/include/bootloader/routines/common_options.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/dialogs.ycp
> …G…
> /usr/share/YaST2/include/bootloader/routines/global_widgets.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/helps.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/i386.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/lib_iface.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/lilolike.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/misc.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/popups.ycp
> …G…
> /usr/share/YaST2/include/bootloader/routines/section_helps.ycp
> …G…
> /usr/share/YaST2/include/bootloader/routines/section_widgets.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/switcher.ycp
> …G… /usr/share/YaST2/include/bootloader/routines/wizards.ycp
> …G… /usr/share/YaST2/include/bootloader/zipl
> …G… /usr/share/YaST2/include/bootloader/zipl/helps.ycp
> …G… /usr/share/YaST2/modules/BootArch.ybc
> …G… /usr/share/YaST2/modules/BootArch.ycp
> …G… /usr/share/YaST2/modules/BootCommon.ybc
> …G… /usr/share/YaST2/modules/BootCommon.ycp
> …G… /usr/share/YaST2/modules/BootELILO.ybc
> …G… /usr/share/YaST2/modules/BootELILO.ycp
> …G… /usr/share/YaST2/modules/BootGRUB.ybc
> …G… /usr/share/YaST2/modules/BootGRUB.ycp
> …G… /usr/share/YaST2/modules/BootLILO.ybc
> …G… /usr/share/YaST2/modules/BootLILO.ycp
> …G… /usr/share/YaST2/modules/BootPOWERLILO.ybc
> …G… /usr/share/YaST2/modules/BootPOWERLILO.ycp
> …G… /usr/share/YaST2/modules/BootStorage.ybc
> …G… /usr/share/YaST2/modules/BootStorage.ycp
> …G… /usr/share/YaST2/modules/BootSupportCheck.ybc
> …G… /usr/share/YaST2/modules/BootSupportCheck.ycp
> …G… /usr/share/YaST2/modules/BootZIPL.ybc
> …G… /usr/share/YaST2/modules/BootZIPL.ycp
> …G… /usr/share/YaST2/modules/Bootloader.ybc
> …G… /usr/share/YaST2/modules/Bootloader.ycp
> …G… /usr/share/YaST2/modules/Bootloader_API.pm
> …G… /usr/share/YaST2/modules/GfxMenu.ybc
> …G… /usr/share/YaST2/modules/GfxMenu.ycp
> …G… /usr/share/YaST2/schema/autoyast/rnc/bootloader.rnc
> …G… /usr/share/YaST2/scrconf/bootloader.scr
> …G… /usr/share/YaST2/scrconf/cfg_bootloader.scr
> …G… /usr/share/YaST2/scrconf/cfg_bootsplash.scr
> …G… /usr/share/applications/YaST2/bootloader.desktop
> …G… /usr/share/doc/packages/yast2-bootloader
> …G… d /usr/share/doc/packages/yast2-bootloader/COPYING
> …G… d /usr/share/doc/packages/yast2-bootloader/README
> …G… /usr/share/doc/packages/yast2-bootloader/autodocs
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootArch.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootArch.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootCommon.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootCommon.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootELILO.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootELILO.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootGRUB.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootGRUB.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootLILO.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootLILO.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootPOWERLILO.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootPOWERLILO.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootStorage.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootStorage.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootSupportCheck.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootSupportCheck.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootZIPL.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/BootZIPL.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/Bootloader.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/Bootloader.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/GfxMenu.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/GfxMenu.mod.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/autoinstall.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_auto.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_finish.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_preupdate.html
> …G… d
> /usr/share/doc/packages/yast2-bootloader/autodocs/bootloader_proposal.html
> … Then the output continues but it is too long to be fully included
> in the message
>
> Best Regards
>
> Wizard847
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMjlX6AAoJEF+XTK08PnB5CMUQAKg2LFdcWp1Y8ASHh1z6MgRc
cFqUYf0d53PXVR9d336/EPg/p4FbJ1vNxi6EPyAETcZdgEOgyp2yAts4DCBZQ2TY
5eu6WYsJ+Y2FC+uisN7/w1vrTHPAMZANfxGlLanQ8thgCv1ZDPm1mwBHJY57Rk86
2ZRWJ7RvFBoQ4P3Q3m9Bw2jiod3lo7FbOJjqw5iVbN1lMSbWvtELyS5nPuNu5u+8
KTArZl7vdjhTSyp17v+4dmEbJXut1UOhB31XiZufNvsJOf15IC8r0DlrMb/lTMJU
KNxjy2MRw6vXM607uIsbJ7/TD6sRv/bnINgdtO00/pEIFGGL8+lxgNuoxjNTkkzh
VG0W4lnJDuRaPcNPMAoQcIldKdquLCzG5kNsSWmPTzQaYDQ8QXHzyBepl2pJLWXk
9kVqSZYrPgTJPb+1ksCIy6pTzCjCCjncVZgcEmvRif3c535vh0MDSwh3is9t+jZO
U1MNJ+f3t0Fh0UCW6127aH+2lpAkJbfvXzoQcBJrL7FQErR6Vrs3x7EYscjex62L
hXROiiri0xKZU60KiqGRAaz3kMTtvXotKGD++ac0DWe95QW1VEmnVvO/reGuQabp
aWy3ty50fEiz80IwpkOBw0jBUpaV3k0sJQ0cAiMumTD4C7HyQS3wS/QEG41CPUbe
1XSzmxcRsIXbRjZSECGu
=hQkJ
-----END PGP SIGNATURE-----

What files or folders in root accidently change and how did you change them?

Restarting the machine was a mistake, you’d have been better off working through the changes.

If you changed them to a new group/owner you could try using the find command


find  /  -gid 100  -ls   | less 
## 
find /  -group goupid  -ls   | less 
##
find /  -uid 1000  -ls  | less 
##
find /  -user goupid   -ls  | less 
##
man find 

You can try using find modifiers -mtime, -mmin, -daystart to narrow the search to the time you think you made the modifications, or just grep today’s date.
Of course you could try to reset those you changed if you could remember.

I did forgot a grep would be extremely helpful to eliminate /home files and folders if you really changed the groupid to 100 (users)


sudo find / -gid 100 -ls  | grep -iv home | less 

On 2010-09-13 18:48, ab@novell.com wrote:
> If your entire filesystem is munged like this then you may be better off
> running through an install choosing to NOT FORMAT your /home partition.
> If group-ownership is all that is a problem we can try to work through
> these but, for example, both of those commands returned a combined total
> of one line (the first one you show there for the ‘sudo’ package).
>
> Here are a couple commands to change THESE packages’ files
> group-ownerships; use at your own risk:
>
> rpm -ql sudo > yastfiles.txt
> rpm -qa | grep -i yast | xargs rpm -ql >> yastfiles.txt
> for i in cat yastfiles.txt ; do chgrp root $i; done
>
> Run the the last bit as root.
>
> Good luck.

In “man rpm” there is an interesting option:

rpm {–setperms|–setugids} PACKAGE_NAME …

However, I can’t find more info in “man” about that option, and “info rpm” gives the node
“libc.info” (and “info” comes out totally blank). With “pinfo” I get the “info” index, but I can’t
find the manual. Plus “locate rpm.info” comes blank.

Good grief!

My guess is that those two options might be to reset the permissions of files of a package, but as I
can’t find any documentation on them, I don’t know what they really are for.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Great find. Google to the rescue:

http://www.cyberciti.biz/tips/reset-rhel-centos-fedora-package-file-permission.html

I had to wrap the --setperms in double-quotes in order to get a good
search result (to avoid explicitly rejecting that as a term I imagine).

Good luck.

On 09/13/2010 07:42 PM, Carlos E. R. wrote:
> On 2010-09-13 18:48, ab@novell.com wrote:
>> If your entire filesystem is munged like this then you may be better off
>> running through an install choosing to NOT FORMAT your /home partition.
>> If group-ownership is all that is a problem we can try to work through
>> these but, for example, both of those commands returned a combined total
>> of one line (the first one you show there for the ‘sudo’ package).
>>
>> Here are a couple commands to change THESE packages’ files
>> group-ownerships; use at your own risk:
>>
>> rpm -ql sudo > yastfiles.txt
>> rpm -qa | grep -i yast | xargs rpm -ql >> yastfiles.txt
>> for i in cat yastfiles.txt ; do chgrp root $i; done
>>
>> Run the the last bit as root.
>>
>> Good luck.
>
> In “man rpm” there is an interesting option:
>
> rpm {–setperms|–setugids} PACKAGE_NAME …
>
> However, I can’t find more info in “man” about that option, and “info rpm” gives the node
> “libc.info” (and “info” comes out totally blank). With “pinfo” I get the “info” index, but I can’t
> find the manual. Plus “locate rpm.info” comes blank.
>
> Good grief!
>
>
> My guess is that those two options might be to reset the permissions of files of a package, but as I
> can’t find any documentation on them, I don’t know what they really are for.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMjtyEAAoJEF+XTK08PnB5iSoQAJiCoK46vfrtk5RC/6WXEOlg
BGv6HGHMY8xJ516YO2/5gkRjVefOmEtk+wokc3ZlXElnEwA/Xdut11I4QR1uavGn
j9hx3EYRMSIE+vmoIm5VhKhe+/MSfZqiM/0/Y5KtY8OjAoD7DkWih4YgnO9LF9ma
zCpE7gfRmJV4/Vj1OB2pSJDYaui8/STRw9JkQmRjXzBGtCgWrqSQEY+55M+CHXsk
YCYmRQ3FqRXZfBRWE/5b4ygVDi2Hp9CJivjlawlkav0u9Q8Fi9RDZyFMx1mA1T2n
KRThbP2Gj9xLN4DH3cIDfx60q94SvM0rODdx+daXIFk1mInkOmncuLYVCjP1vtZd
eggmlqASUbKtIKXpQHGZCPS9SxzH6ji1gEMpPEnwAwDHqeLtijHZKBvDABEV6W/4
nffgJmM8Ht/zmvXHQRum/SJOlKFbLc4NNmQ1lS7FvV3k9sv9kY7BOiK/ycvz063j
DSIlslMIOh+YeCg4j28qa355ey4bHVbwWUZhltZYtDeajpgLfv656sjh2DWl7zsc
cORnHvEt1AHJ4U4ECSLD8NW6lnMPTmIUdCnzekBcS7vrYvA97Mfwc4C5wqdRsOxJ
Bttf2VVyti167+EIbg1mhsDNcdK1hgA+OoQtTrEMaj/alx7DIN1wv6Dx6/h/OqJz
GVVt3m6MtJUAyLLTZPkP
=EHkA
-----END PGP SIGNATURE-----

On 2010-09-14 03:42, Carlos E. R. wrote:
> On 2010-09-13 18:48, ab@novell.com wrote:

> My guess is that those two options might be to reset the permissions of files of a package, but as I
> can’t find any documentation on them, I don’t know what they really are for.

Indeed they are, those two options are used to repair permisions or ownership of packages. I asked
in the mailing list and got a fast answer from Michael S. Dunsaavage:

]> http://www.cyberciti.biz/tips/reset-rhel-centos-fedora-package-file-permission.html

So, the OP can get the list of damaged packages with the verify option, and then repair all those
packages. After that “SuSEconfig --module permissions” would do the rest.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

Hi guys,

Thank you very much for assisting me in this horrible situation >:(!
At least I have a path to follow :).
I run the commands suggested in the web page

" for p in $(rpm -qa); do sudo rpm --setperms $p; done"
" for p in $(rpm -qa); do sudo rpm --setugids $p; done"

I had to insert sudo otherwise it was not working.
The first command was quite ok in its results, whereas the second run ok for a while and then returned:

“sudo: must be setuid root”

Similarly the last command “sudo SuSEconfig --module permissions”
returned the same result.

Obviously YaST2 does not work and besides it seems at the present stare I am not able to obtain root priviledges anymore using sudo.

This command still returns hundred lines of output
“rpm -qa | grep -i yast | xargs rpm -V”

I guess I am quite in trouble! :\

Regards

Wizard847

Instead of sudo use su - to become root. It is really more the Suse way sudo is more the Ubuntu way. Won’t say which is better but they are different.

Now you changed a bunch of permissions and hopefully the rpm method will fix at least some, but there are others that may still be incorrect. Mainly config files that are not properly part of the rpms. It is truly hard to say what that will do to you.

I recommend reinstalling and being much more careful in the future. Freedom also allows you to shoot you foot. :slight_smile:

On 2010-09-14 15:40, Wizard847 wrote:
>
> Hi guys,
>
> Thank you very much for assisting me in this horrible situation >:(!
> At least I have a path to follow :).
> I run the commands suggested in the web page
>
> " for p in $(rpm -qa); do sudo rpm --setperms $p; done"
> " for p in $(rpm -qa); do sudo rpm --setugids $p; done"
>
> I had to insert sudo otherwise it was not working.
> The first command was quite ok in its results, whereas the second run
> ok for a while and then returned:

Just use “su -” first. It works faster and safer. In a terminal. Or log as root in text mode. Forget
sudo!

> This command still returns hundred lines of output
> “rpm -qa | grep -i yast | xargs rpm -V”
>
> I guess I am quite in trouble! :\

repeat te procedure as root, as explained.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))