This forum has been archived. All content is frozen. Please use KDE Discuss instead.

leap 15-1 kde 5.55 - Konsole as root without password failed

Tags: None
(comma "," separated)
User avatar
jcdole
Registered Member
Posts
49
Karma
0
OS
Konsole as root without password failed to open without any error.

That was working for years as soon as you have set up /etc/sudoers to enable users in group wheel and you have set up user's kdesurc file.
The command used to use from the application launcher is
Code: Select all
kdesu -c 'konsole --profile Root_WHEEL'


Any help is welcome urgently.
airdrik
Registered Member
Posts
1854
Karma
5
OS
I wonder why you need to run the Konsole GUI as root rather than just su-ing to root inside of (launched-as-current-user) Konsole?


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
jcdole
Registered Member
Posts
49
Karma
0
OS
airdrik wrote:I wonder why you need to run the Konsole GUI as root rather than just su-ing to root inside of (launched-as-current-user) Konsole?

Thank you for answering.
But I am sorry that does not answer my question.
airdrik
Registered Member
Posts
1854
Karma
5
OS
Perhaps I should have framed it differently as I was suggesting an alternative which I believe should work for you, but framed it as a question (which you avoided answering) to see if you had a valid reason why you needed it to work the way that you describe rather than using any of a number of other valid workflows.

So I'll re-frame that as a more direct suggestion: Instead of running the Konsole Gui as root, you set up a konsole profile which starts a root shell.
I don't see any benefit from running the Konsole Gui as root when all you really care about is a convenient way to open a Konsole session and run commands as root.


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
jcdole
Registered Member
Posts
49
Karma
0
OS
airdrik wrote:Perhaps I should have framed it differently as I was suggesting an alternative which I believe should work for you, but framed it as a question (which you avoided answering) to see if you had a valid reason why you needed it to work the way that you describe rather than using any of a number of other valid workflows.

So I'll re-frame that as a more direct suggestion: Instead of running the Konsole Gui as root, you set up a konsole profile which starts a root shell.
I don't see any benefit from running the Konsole Gui as root when all you really care about is a convenient way to open a Konsole session and run commands as root.

Thank you for answering.
But I am sorry that does not answer my question which was :
Konsole as root without password failed to open without any error.
That was working for years as soon as you have set up /etc/sudoers to enable users in group wheel and you have set up user's kdesurc file.

And there is two important parts in my question :
1 :
Code: Select all
Konsole as root [color=#FF0040]without password[/color]

2 :
Code: Select all
[color=#FF0040]That was working for years[/color]
airdrik
Registered Member
Posts
1854
Karma
5
OS
Why do you care so much about running Konsole as root? I'm offering an alternative that you are immediately dismissing without considering that it may be a worthwhile approach to what you want (besides being more secure as there are less bits running with elevated permissions)

When you try to run Konsole as root, what is the error that pops up? Is it merely that it prompts for a password? If that is the case it most likely has nothing to do with Konsole and only with differences in the sudo settings between the old and new systems.

Are there other applications you run as root in similar manner? do they still work as they did before and/or as you intend Konsole to work?


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
jcdole
Registered Member
Posts
49
Karma
0
OS
airdrik wrote:When you try to run Konsole as root, what is the error that pops up?

Application does not open. No popup error.

airdrik wrote:Is it merely that it prompts for a password?

Of course not. That is the purpose of /etc/sudoers to give root access to user belonging to group wheel (and the presence of ~/.config/kdesurc for each user in the wheel group).

airdrik wrote:If that is the case it most likely has nothing to do with Konsole and only with differences in the sudo settings between the old and new systems.

Surely something like that.

airdrik wrote:Are there other applications you run as root in similar manner?

Yes and not
Yes --> yast2 (gui) ; dolphin (gui) ; ......
and not : The calling process is different
yast2 use : /usr/bin/xdg-su -c /sbin/yast2
Dolphin use : dbus-launch dolphin -qwindowtitle "%c" "%u"

airdrik wrote:do they still work as they did before and/or as you intend Konsole to work?

yes but the calling process is different.

Calling konsole with sudo works within a running konsole.
Code: Select all
sudo konsole

open a konsole as root without asking for password.

What does not work is calling konsole with a specific profile, from the kickoff menu
here is the command definition in the kickoff menu :
Code: Select all
konsole --profile "WHEEL_ROOT_SHELL"

Here is the definition of the profile
Code: Select all
[Appearance]
ColorScheme=Black_On_Dark_Yellow
Font=Hack,10,-1,5,50,0,0,0,0,0,Regular

[General]
Command=DISPLAY=":0" /usr/bin/sudo bash
Icon=RootTerminal.png
Name=WHEEL_ROOT_SHELL
Parent=FALLBACK/

[Scrolling]
HistoryMode=2

[Terminal Features]
BlinkingCursorEnabled=true

Note 1:
Code: Select all
Command=DISPLAY=":0" /usr/bin/sudo bash

or
Code: Select all
Command=/usr/bin/sudo bash

Make no difference
Note 2:
Code: Select all
Command=DISPLAY=":0" /usr/bin/sudo su

or
Code: Select all
Command=/usr/bin/sudo su

Make no difference.
Note 3 :
Leap 15 is opensuse, they configure sudo differently as others.

Thank you for helping.
airdrik
Registered Member
Posts
1854
Karma
5
OS
Does it make a difference if you use the -i flag which runs a login shell for that user:
Code: Select all
sudo -i

or
Code: Select all
sudo -i bash


(setting/overriding the DISPLAY variable should be avoided as that is tying the command to a specific graphical display session. Not a big deal in a single-user, single-session system, though)


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]