KDE Konsole - Open as super user without password

Hello.

I try the recommendation of wolfi323 in the thread #4 of
https://forums.opensuse.org/showthread.php/512950-How-use-quot-sudo-quot-without-password#4

here is sudoers ( comment have been removed )


Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/bin"

Defaults !env_reset

Defaults !insults

#Defaults targetpw            # ask for the password of the target user i.e. root
#ALL   ALL=(ALL) ALL         # WARNING! Only use this together with 'Defaults targetpw'!

root ALL=(ALL) ALL

##
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

##
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

##
## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d

After creating a new user for the test, put it in group wheel, create kdesurc for this user.
The user can start yast, dolphin ‘super user mode’, cat /root files.
Then I create a kde konsole profile named ‘Root_Shell_WHEEL_JCD’

here is the config file in “/home/user_test/.local/share/konsole/Root_Shell_WHEEL_JCD.profile” :

[Appearance]
ColorScheme=Black_On_Dark_Yellow
Font=Hack,11,-1,5,50,0,0,0,0,0,Regular

[General]
Command=sudo bash
Icon=/backup_sys/¬000_COMMON/¬¬ICONS_WALLPAPERS_THEMES/AVATARS_ICONS_PICTURES/ICONS/KONSOLE/RootTerminal.png
Name=Root_Shell_WHEEL_JCD
Parent=FALLBACK/

[Scrolling]
HistoryMode=2

[Terminal Features]
BlinkingCursorEnabled=true

THe file “Black_On_Dark_Yellow.colorscheme” exists in the same folder.

Here is konsolerc :

[Desktop Entry]
DefaultProfile=Profile_std_JCD.profile

[Favorite Profiles]
Favorites=Root_Shell_WHEEL_JCD.profile,Profile_std_JCD.profile,Root_Shell_JCD.profile

[MainWindow]
Height 1080=939
State=AAAA/wAAAAD9AAAAAAAABU4AAAOFAAAABAAAAAQAAAAIAAAACPwAAAAA
ToolBarsMovable=Disabled
Width 1920=1358

I can change the color to “Black_On_Dark_Yellow.colorscheme” in a standard konsole; so I suppose thatr there is no problem with the color file.
I can switch to root shell profile in a standard konsole
I cannot switch to Root_Shell_WHEEL_JCD profile in a standard konsole. The windows closed not opportunely.

Trying to start a new konsole as root without password give that error :

user_test@ASUS:~> ~/test_konsole.sh
.
WHOAMI             : user_test
.
.
USER NAME ($USER) : user_test
.
.
USER NAME (id -un) : user_test
.
.
ID                 : 1001
.
COMMAND : konsole --profile Root_Shell_WHEEL_JCD
XIO:  fatal IO error 0 (Success) on X server ":0"
      after 575 requests (575 known processed) with 0 events remaining.
user_test@ASUS:~> 


Any help is welcome

I’d expect if user_test is already a member of the wheel group, then it should not make sense to try to su or sudo to root.
Similarly, a User who is already elevated should not likely be able to join the wheel group.

Is that what you’re asking?

BTW -
I guess you know that this whole course of action which is often recommended in other distros (an interactive User account made a member of the wheel group) is IMO a severe security compromise and should be avoided if possible because it will mean <everything> you do will have root permissions, it’s the same as logging in as root all the time… So, if that is your intention then why not just avoid all this trouble and simply login as root? It’s what MSWindows in the XP days and earlier was criticized for, and MS fixed that(You now have to go through a procedure called UAC). I consider a <non-interactive> User account where the account cannot be used to login to the system is OK to add to the wheel group.

TSU

The problem comes from the icon file size (40 KiB) or the icon pixel size (4096x4096).
Problem is closed.

Thank you for helping