Sunday, November 12, 2006

» kdesu with sudo

With KDE 3.5.5, kdesu now supports using sudo instead of su Here is how to enable it:
mkdir -p ~/.kde/share/config cat<<EOF > ~/.kde/share/config/kdesurc [super-user-command] super-user-command=sudo EOF
And here is the corresponding item in KDE's bugzilla, with further details: UPDATE: or, as Ben Kevan puts it, using kwriteconfig:
kwriteconfig -–file kdesurc -–group super-user-command -–key super-user-command sudo

Labels: ,


Anonymous Anonymous said...

wow, watch what you do with that one!!! the very _existence_ of that file means that clicking on 'Administrator Mode' doesn't ask you for _any_ kinds of passwords (!)

this i think is _great_ for a desktop system with a minimum of fuss/hassle (for systems which you're not going to _have_ a root password)

but it's not for everybody.

for me: i am rolling out kde desktop systems, and it's _brilliant_ to minimise the number of 'what's the root paaaaaassswooooord' questions.

great stuff!

Anonymous Anonymous said...

Great, thanks for this hint! But, actually, it's cat > instead of cat <

Anonymous Anonymous said...

What? I can have KDE desktop environment use the sudo command instead of su when I need to run priveleged or administrative commands?!? This completes the puzzle.

BTW: I'm a KDE 3.5 fan. KDE folks, keep the updates, pleease? KDE4 is completely a different environment.
Re: luke
This is a great suggestion. I knew how to change the GNOME authentication manager (is that a proper term?) from gksu to gksudo, but I couldn't find how to do this in KDE.

In contrast to Luke's worries, I consider sudo much more versatile, and safe, than using su. sudo allows much finer grained control of user access, and specifies which users can do what, eliminating the need to enter the **root password**. With sudo, you will not be asked for passwords only if your system is configured to allow a certain user root access without password.

Re: Christoph

Notice that the command given is
cat << EOF > ...
the double-less-than is used to tell cat when to stop reading from input, that is at "EOF"
the single-greater-than is to tell it what file to write to.
So you are right, but half-way, and our poster does use this bit of your comment already.

@loki: Thank you, and I've noticed a spam comment on its way here.


Post a Comment

<< Home