PDA

View Full Version : " Su returned with an error " in KDE [SOLVED]



JediatNight
01-08-2007, 06:57 PM
Hi all,

I'm running Knoppix 5.1 and i cant use my root password in KDE dialogs for anything ..whenver i try to login in administrator mode in KDE , i get an "Su returned with an error" message .


I read in a few forums that its because users should be added to the sudoers list ..
Im posting the contents of my sudoers file in /etc/sudoers , below:


# sudoers file.
#
# This file MUST be edited with the "visudo" command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL

# KNOPPIX WARNING: This allows the unprivileged knoppix user to start commands as root
# KNOPPIX WARNING: This is totally insecure and (almost) makes knoppix a second root account.
# KNOPPIX WARNING: Never allow external access to the knoppix user!!!
Myusername ALL=(ALL) ALL


Can anyone tell me whats wrong? I tried a lot but it doesnt seem to work for me..even though the configuration seems correct

Can anyone help?
Thanks in advance

marhleet
01-09-2007, 08:19 AM
if this is an install,
you can login as root ?
but not get some su things to work

get kpackage to do all the updates it can
some of the packages are out of synch i think with older/newer versions

after a dist-update
and update
and install
i got my root access back

JediatNight
01-09-2007, 11:24 AM
I can login as root in the bash shell using the command su . I will try upgrading the distro and see if i can get into the sudoers list.

can you login as root in the KDE menus in administrator mode? or only in bash shell? Please let me know.

marhleet
01-10-2007, 08:03 AM
root can't login to the kde desktop environ

but you will see that if you can login on the ctrl-alt-F1/2/3/4 screens then you can still su away
just not in gui mode

but once the system is all synched up with the apt-get update's
fingers x'd
should be back to normal

JediatNight
01-10-2007, 03:19 PM
I did apt-get dist-upgrade and then apt-get update

Still , I have the same error , "Su returned with an error " in KDE 3.5 HD install

I'm running kernel 2.6.18 as I had to use the driver for my Nvidia Gefoce2 MX 200 card

Can anyone tell me how i can get rid of this error and use administrator mode in KDE ?

I can work in super user mode SU in the bash shell but not in the graphical menus of KDE.
Did anyone has the same problem?

if i type sudo in the bash shell , i get the following:

bladerunner@andromeda:~$ sudo
sudo: /etc/sudoers is owned by uid 1000, should be 0

Please let me know if you can suggest anything.
Thanks in advance

onemyndseye
01-11-2007, 07:36 AM
Ah!!!... Theres the rub :) (so to speak) lol

This file should be owned by root (UID=0)
So.... as root do this:




chown root:root /etc/sudoers



Also the file permissions may need to be reset with something like:
(as root)



chmod 0650 /etc/sudoers



Im curious to know how this file came to be owned by UID=1000 (which is you BTW).. did this file get deleted somehow causing you to have to re-create it? Any guess?

Hope this helps,
-Justin
One Mynds Eye

Rocket
01-11-2007, 12:22 PM
Hi all,

I'm running Knoppix 5.1 and i cant use my root password in KDE dialogs for anything ..whenver i try to login in administrator mode in KDE , i get an "Su returned with an error" message .

Can anyone help?
Thanks in advance

A work around I have been using, used the run to start kdesu konqueror. Instead of hitting ok, I go into options & select run as a different user "Root" with passwd. This gives me a GUI method of working the admin side of things, with this error still in place for normal methods.

JediatNight
01-11-2007, 05:15 PM
Thanks, I will try this and let this forum know.. Any Debian admins here can comment why I get the error which is described above? Isn't it possible to fix it in the "normal way" ?

Awaiting your respose(s),

Thanks in advance

JediatNight
01-12-2007, 12:42 AM
Thanks One Mynds Eye , it worked :)

but i had execute chmod 0440 /etc/sudoers as root instead of chmod 0650 /etc/sudoers

I too dont know how it got owned by UID 1000 . I think i recreated the file with a text editor,kwrite after deleting it.

cheers

Capricorny
01-14-2007, 03:24 PM
Instead of
Myusername ALL=(ALL) ALL
I used
%sudo ALL=(ALL) ALL

Then everyone belonging to the sudo group, and no one else, can run sudo. It works fine here. To edit, it's safest to run the visudo command. vi tutorial for example here: http://www.eng.hawaii.edu/Tutor/vi.html

JohnnyH
01-20-2007, 02:29 PM
Having just installed Knoppix 5.1.1 from the CD, I also get this error.

This error does not happen with either a Debian installation from Knoppix 5.0.1, nor with a 'pure' Debian installation of 'Etch'.
In all cases I am running with the same version of KDE libraries (3.5.5a.dfsg.1-5), which at the time of this posting applies to both 'testing' and 'unstable'.

This suggests that it may be a problem specific to Knoppix 5.1.1 rather than KDE (and I can't find it listed in the KDE Bug Reports).

For security reasons, I prefer to retain the enforcement of case-by-case log-on as superuser(root). This works if you use the Gnome equivalent gksu instead of kdesu (apt-get install gksu).
For many applications you have to create custom KDE Buttons with executables such as the following examples (note the single quotes ' where applicable) :-

gksu 'konqueror --profile filemanagement'

gksu kuser

If anyone finds out how to get kdesu working, that's even better ! 8)

onemyndseye
01-24-2007, 06:56 AM
kdesu works for me ..... you should make sure your system is current by doing ` apt-get update ; apt-get upgrade ` .... that usually fixes any problems with kdesu doing weird stuff


Take Care,
-Justin
One Mynds Eye

JohnnyH
01-24-2007, 10:44 AM
Thanks; apt-get update & apt-get upgrade has also worked for me in the past to ensure kdesu works on matching libraries.
But not this time, on an installation from the 5.1.1 CD.


This error does not happen with either a Debian installation from Knoppix 5.0.1, nor with a 'pure' Debian installation of 'Etch'.
In all cases I am running with the same version of KDE libraries (3.5.5a.dfsg.1-5), which at the time of this posting applies to both 'testing' and 'unstable'. ... these situations were achieved via apt-get update & apt-get upgrade.

It looks like a permissions issue somewhere in relation to how kdesu is managed which as we have seen can be worked-around by making the user(s) sudoers. Which is a work-around but not a secure cure, and I would prefer to find and correct the specific cause, if only to help the progress of Knoppix.

onemyndseye
01-24-2007, 01:25 PM
(I should learn to read better :) ) hrmm... I have a couple different boxes... Maybe i can turn up something.

I running 5.1.0 and dont see that issue so it must be something with 5.1.1 specifically.


Thanks,
-Justin
One Mynds Eye

JohnnyH
01-24-2007, 07:30 PM
:) Thanks for that gracious and useful posting; narrowing it down to a change between 5.1.0 and 5.1.1 might lead to a 'Eureka!' thought if somebody with detailed knowledge of the update chances to read this.
This prompted me to revisit the release notes for 5.1.1 :-
SNIP

* V5.1.1-2007-01-04 (see also: Release Notes at http://knopper.net/knoppix/knoppix51-en.html)
- Updated kicker and kdebase (while fixing a nasty bug that made kicker "disappear"
in all but the first desktop)
- Updated ntfs-3g (writing speed improvements)
- sudo helper for kdesu

END-OF-SNIP
Hmmm - interesting ! I'm beginning to think that this might justify raising a bug report - I'll give a little longer to see if any more information emerges.

Rocket
01-24-2007, 09:27 PM
Thanks; apt-get update & apt-get upgrade has also worked for me in the past to ensure kdesu works on matching libraries.
But not this time, on an installation from the 5.1.1 CD.


This error does not happen with either a Debian installation from Knoppix 5.0.1, nor with a 'pure' Debian installation of 'Etch'.
In all cases I am running with the same version of KDE libraries (3.5.5a.dfsg.1-5), which at the time of this posting applies to both 'testing' and 'unstable'. ... these situations were achieved via apt-get update & apt-get upgrade.

It looks like a permissions issue somewhere in relation to how kdesu is managed which as we have seen can be worked-around by making the user(s) sudoers. Which is a work-around but not a secure cure, and I would prefer to find and correct the specific cause, if only to help the progress of Knoppix.

It seems to me, that kdesu in this version, is not automatically associated with the root user. See my previous post, on kdesu konqueror work around for details. I have found this on the dvd, as well as the cd varient of 5.1.1.

onemyndseye
01-26-2007, 06:37 AM
Johnny-

I wonder if running say ` kdesu konqueror ` from a terminal window will give us a clue? .... also maybe ` strace kdesu konqueror >~/kdesu.out `

another idea...

if you can find the exact package (I started looking but didnt have time to finish) that kdesu is contained in....you may have luck doing something like:

apt-get --purge remove <package name> && apt-get install <package name>

since its likey to be a config issue that we are dealing with that might fix your problem by purging the config files and reinstalling them from scratch.... hard to say if it will cause some unforseen problem but it may work :)

Just remember my motto: Half the fun of fixing it is tearing it up again :)
-Justin
One Mynds Eye

JohnnyH
01-26-2007, 03:58 PM
Justin,

I haven't yet managed to get anything that seems useful by running ` kdesu konqueror ` from a terminal window
Running under strace on the other hand produces a lot of output ~320KB - too much to post ! :?

BTW /usr/bin/kdesu and /usr/bin/kdesud are in kdebase-bin
/usr/bin/kdesu_stub and /usr/lib/libkdesu.so.4.2.0 and /usr/lib/libkdesu.so.4 are in kdelibs4c2a

I've checked their release numbers and ownerships and permissions ; these are identical to those in the systems (Knoppix 5.0.1 and Debian Etch) where kdesu works perfectly.

Anyway it's worth a try to reconfigure ... dropped out of X to dpkg-reconfigure first ... no difference.
I might do a purge & re-installation as you suggest later when I have the time, as taking out those packages will take a lot of my installed system with them.

Keeping on brainstorming ... Johnny. :)

bas
01-27-2007, 04:50 AM
I just installed Knoppix 5.1.1 to my HDD last night, and I am too having problems w/ superuser. I can do hardly anything. The workarounds posted in this topic provide a little help, but they always wind up making the apps appear in German. Is this an isolated incident? And is their anything to fix this?

JohnnyH
01-28-2007, 11:55 AM
bas,
You're not alone; whilst superuser konqueror and kuser (as in my previous posting) come up in my KDE locale language (English GB - I have kde-i18n-engb installed), I have now also tried guarddog. Guarddog comes up in English for the normal user but in Deutsch for superuser.
Yet when I start X and KDE as root from a console, I have configured the KDE locale to English there as well.
And when I start guarddog from the root account it comes up in English.
So at the moment I do not have an explanation. :wink:

Rocket
01-30-2007, 03:52 AM
I just installed Knoppix 5.1.1 to my HDD last night, and I am too having problems w/ superuser. I can do hardly anything. The workarounds posted in this topic provide a little help, but they always wind up making the apps appear in German. Is this an isolated incident? And is their anything to fix this?

I have found for the german problem, kdesu konquer with workaround. Go to etc/default/locale & change lang from de to required lang en_us in my case. You can also do the kde control panel admin settings thru kdesu, save changes, close & reboot. After the etc/default/locale change is done konqueror will be in your set lang. This is based on my exeriance with it.

JohnnyH
01-30-2007, 11:11 PM
I sent the following Feedback to knopper.net. Many thanks to Klaus Knopper for his response, as appended.



> KNOPPIX= 2007-01-04
> Category= feedback Feedback
> Comment=
> Knoppix 5.1.1 installed on Hard Drive: when kdesu is invoked, it
> gives an error message:-
>
> \"Su returned with an error\"
>
> It is reported that this does not happen with Knoppix <= 5.1.0
>
> The error does not happen if invoked by user with root privilege.
>
> Quote from release notes:
> * V5.1.1-2007-01-04 (see also: Release Notes at http://
> knopper.net/knoppix/knoppix51-en.html)
> - Updated kicker and kdebase (while fixing a nasty bug that made
> kicker \"disappear\"
> in all but the first desktop)
> - Updated ntfs-3g (writing speed improvements)
> - sudo helper for kdesu (End-of-Quote) (?)




I really hate the installer. ;-)

The workaround for that bug is to re-add the user calling kdesu, to
/etc/sudoers, OR remove the kdesurc config file that enabled
passwordless "sudo" instead of the dialog.

With kind regards
-Klaus Knopper


IMO this information completely resolves this "Su returned with an error" thread.

onemyndseye
01-31-2007, 08:17 AM
Most excellent!! :) I just knew it was a config issue :) .... I will take a look at that config file tonight!..

Also.. The post above about kdesu and lang issue was indeed fixed by following the method that Rocket posted above... It did fix the issue but the system complained that " en_us " was a invalid setting.. It probably worked since the default setting was invalid the system fell back to the currently selected language.

For default to english set to ` LANG=C `...whohoo! I can finially qtparted in english without issuing "sudo qtparted " from a term :)




onemyndseye@exodus:~$ cat /etc/default/locale
# File generated by update-locale
LANG=C



This can also be changed with the ` update-locale ` command.



update-locale LANG=<your lang here>



From what I can see this should probably be added to the current dev of the knoppix-autoconfig in the localization section (i.e. update-locale LANG=$LANG) to make sure your system defaults to your chosen language. update-locale performs some sanity checks on your variables to try to keep everything straight so there shouldnt be a problem there.

I branched this into another Thread: http://www.knoppix.net/forum/viewtopic.php?p=111095


**EDIT***
After looking for awhile I didn't find a kdesurc on my system (either in ~/.kde/share/config/kdesurc or /etc/kde3/kdesurc or /usr/share/config/kdesurc)... was verified by a full filesystem search for *kdesurc* . This would explain why I did not see this behavior on my 5.1.0 installation. I would guess that you (and others having this problem) will find this file at the default location or in your home directory and it will contain " super-user-command=sudo " which when coupled with the NOPASSWD: ALL entry in /etc/sudoers would account for the passwordless operation when running from the cd and the subsequent failure after installing to the HD since user "knoppix" is no longer the once calling kdesu. It also explains the "band-aid" fix we found earlier in this thread...adding the user to /etc/sudoers. Either remove the file all together or change the line from:

super-user-command=sudo

-to-

super-user-command=su

**END-EDIT**

Take Care,
-Justin
One Mynds Eye

JohnnyH
01-31-2007, 10:38 AM
Thanks Rocket and Onemyndseye :)

I can confirm that both locale and su work in my 5.1.1 system as you predict.

(In 5.1.1) kdesurc is in :-

/etc/skel/.kde/share/config/kdesurc
(Leave unchanged if remastering a live CD to preserve the Knoppix 5.1.1. way)

and, for user(s) in an HD-installed system,

$HOME/.kde/share/config/kdesurc
(Change as per Onemyndseye's posting for each user)

Whew ! :)

PS Just seen your new thread dedicated to locale Onemyndseye : excellent move to break it out with its own title.

minnow
05-01-2008, 06:03 PM
Yes, thanks all! By following Klaus' advice I am up and running.

Jonah
05-18-2009, 05:54 PM
OK so there was a link which I conveniently forgot to recall...

About changing two lines in a file somewhere in the vast depths of /home/.kde configuration files.

To change the "sudo" command, which the Live CD recognizes, to "su" which the HD install of KDE recognizes.

I'll find that one soon enough.

I linked to this off a discussion of the error message "this feature only available with HAL" mounting media from KDE as non-root user in a post-install of 5.x

there were a few other links further down the discussion which I have to go back and check and one of them is with the "su" versus "sudo" conflict.


For starting in your own language,(and KEYBOARD!!) important to the next tip... edit in /boot/grub/menu.lst on the line


kernel /boot/vmlinuz root=/dev/hda1

add

lang=(your) keyboard=(your)

For me that would be lang=us keyboard=dvorak

This gets me to where in the shell environment everything is in English which I speak read and write instead of am der Deutschlandisch which I don't.

And I can type in "root" without mentally switching over to QWERTY and without making the error of typing "ossk"

So far, so good, yes?

At the login screen hit Ctrl+n and it gives you a console login.

(I also like keyboard navigation, instead of using the mouse for everything. The mouse slows down my typing.)
Login as root and type startx.

Magicko Presto you have your KDE as root.

In your own language.

And Keyboard.

Jonah
05-18-2009, 06:10 PM
knew I'd find it.

For the patience-impaired here it is...

in the file /home/YOUR_name/.kde/share/config/kdesurc


[super-user-command]
super-user-command=sudo

change it to


[super-user-command]
super-user-command=su

save and exit.

I think it requires a KDE restart but that's no problem.