[opensuse] zypper: sudo vs su
Dear all, I used to run a script sudo zypper ref sudo zypper lu echo "ready" sudo zypper up to install updates; recently, that led to "permission denied" errors (see below) that could only be avoided by becomin root and then calling zypper. What is the reason? And isn't it generally recommended to use sudo instead of su? Thanks for your input. regards Geza The errors looked like: Retrieving repository 'openSUSE Current OSS' metadata [\] Permission to access ' http://download.opensuse.org/distribution/openSUSE-current/repo/oss/media.1/...' denied. Abort, retry, ignore? [a/r/i/?] (a): a Retrieving repository 'openSUSE Current OSS' metadata [error] Repository 'openSUSE Current OSS' is invalid. [|] Valid metadata not found at specified URL(s) Please check if the URIs defined for this repository are pointing to a valid repository. Skipping repository 'openSUSE Current OSS' because of the above error. I removed the repositories and added them again, deleted the cache, did zypper clean etc, the error persisted (for all repositories); only when followin a suggestion in an old forum thread I became root and started zypper then, everything works fine again. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 07 April 2012 17:54:51 Geza Giedke wrote:
to install updates; recently, that led to "permission denied" errors (see below) that could only be avoided by becomin root and then calling zypper. What is the reason? And isn't it generally recommended to use sudo instead of su?
Have you tried a rpm --rebuiddb ? Anyway using su or sudo should make no difference. And yes, it's safer to use sudo instead of logging as root. -- Bogdan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 07 April 2012 18:01:49 you wrote:
Have you tried a rpm --rebuiddb ? Anyway using su or sudo should make no difference. And yes, it's safer to use sudo instead of logging as root.
I mean "rpm -rebuilddb". Sorry for the typo. -- Bogdan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-04-07 17:54, Geza Giedke wrote:
And isn't it generally recommended to use sudo instead of su?
If you ask me, no.
Retrieving repository 'openSUSE Current OSS' metadata [\] Permission to access ' http://download.opensuse.org/distribution/openSUSE-current/repo/oss/media.1/...' denied.
You should look at the log, the message is absurd.
followin a suggestion in an old forum thread I became root and started zypper then, everything works fine again.
Did you use plain "su" or "su -"? - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk+AqJ8ACgkQIvFNjefEBxqj5gCeJLXdnsa/bCxepiUBUC2SKBZO vnsAni5BlaFrBvH//8K/l+wCF9tefQQ6 =dbPZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
60000 lines long and I can't identify which relate to the error I was seeing; since things work fine again for the time being, I'll let them be for now;
thanks Carlos and Bogdan for your replies; /var/log/zypper.log is possibly the problem was caused by an update gone wrong due to bad internet connection the problem went away when I used su to become root and then called zypper I'll use your suggestion if the problem recurrs. regards Geza On Sat, Apr 7, 2012 at 10:50 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2012-04-07 17:54, Geza Giedke wrote:
And isn't it generally recommended to use sudo instead of su?
If you ask me, no.
Retrieving repository 'openSUSE Current OSS' metadata [\] Permission to access ' http://download.opensuse.org/distribution/openSUSE-current/repo/oss/media.1/...' denied.
You should look at the log, the message is absurd.
followin a suggestion in an old forum thread I became root and started zypper then, everything works fine again.
Did you use plain "su" or "su -"?
- -- Cheers / Saludos,
Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAk+AqJ8ACgkQIvFNjefEBxqj5gCeJLXdnsa/bCxepiUBUC2SKBZO vnsAni5BlaFrBvH//8K/l+wCF9tefQQ6 =dbPZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/10/12 10:56, Geza Giedke pecked at the keyboard and wrote:
60000 lines long and I can't identify which relate to the error I was seeing; since things work fine again for the time being, I'll let them be for now;
thanks Carlos and Bogdan for your replies; /var/log/zypper.log is possibly the problem was caused by an update gone wrong due to bad internet connection
the problem went away when I used su to become root and then called zypper
You are better off using su - then plain su. That way you are using root's login environment instead of the user's login environment.
I'll use your suggestion if the problem recurrs.
-- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El mar, 10-04-2012 a las 12:09 -0400, Ken Schneider - openSUSE escribió:
On 04/10/12 10:56, Geza Giedke pecked at the keyboard and wrote:
60000 lines long and I can't identify which relate to the error I was seeing; since things work fine again for the time being, I'll let them be for now;
thanks Carlos and Bogdan for your replies; /var/log/zypper.log is possibly the problem was caused by an update gone wrong due to bad internet connection
the problem went away when I used su to become root and then called zypper
You are better off using su - then plain su. That way you are using root's login environment instead of the user's login environment.
I'll use your suggestion if the problem recurrs.
-- Ken Schneider SuSe since Version 5.2, June 1998
I would go with su -c "command" (v.g. commands like zypper patch or zypper up...) It is precise and exclusive command specially if you want it to perform just that. Regards, -- Ricardo Chung | Panama Linux Ambassador openSUSE Projects -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Ricardo Chung said the following on 04/10/2012 01:14 PM:
I would go with su -c "command" (v.g. commands like zypper patch or zypper up...) It is precise and exclusive command specially if you want it to perform just that.
And the quotes are important! -- The trouble with troubleshooting is that trouble shoots back. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-04-10 18:09, Ken Schneider - openSUSE wrote:
On 04/10/12 10:56, Geza Giedke pecked at the keyboard and wrote:
the problem went away when I used su to become root and then called zypper
You are better off using su - then plain su. That way you are using root's login environment instead of the user's login environment.
absolutely. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk+EbpkACgkQIvFNjefEBxqJuQCfdCoUvKBnb9tbVFY2ZKXrZVJ2 8uUAn3dX1vuf85vyNe8706F4ejRHZ8o/ =edg4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Anton Aylward
-
Bogdan Cristea
-
Carlos E. R.
-
Geza Giedke
-
Ken Schneider - openSUSE
-
Ricardo Chung