Is root password needed when execute xdg-su qphotorec in superuser terminal? Is it any security issue by doing this?
If you’re in a superuser terminal, you’re already root.
It’s generally recommended, though, to not run software that doesn’t need root privileges as root.
When you do that, it probably will ask for the root password. But calling xdg-su
is of course not needed at all when you are already root
.
@hendersj already explained.
When you are in a GUI, then you are a normal user (root
should never use a GUI). Then, when you need a GUI program to be run as root
you use the appropriate (for the desktop used) program to arrange that for you. In your case that program is xdg-su
. One example is YaST, but there it is even made more easy, because starting YaST by clicking on the icon already calls xdg-su
, so no need to do that explicit. For a GUI program, like you seem to have one, where this is not included in the call connected to an icon (but you can of course create one), you start a terminal, as your user, and do the appropriate xdg-su qphotorec
from that command line. Using a direct command line interface, as featured in many desktops, does the same.
It is not needed, and thus frowned upon (to say the least), to do that from a “superuser” terminal inside your desktop.
HTH in understanding.
(PS, you are not the only one, I have seen people who "became root
" to "become root
" to hop to “superuser status” in indeed up to three times. The result, they indeed run processes with root
as process owner, but did not really understand what they did).
When running qphotorec as root in a termnial:
linux64:/home/stephan # qphotorec
QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 100
Could not find color scheme "ZionReversed_BreezeColorsBLUEDV3" falling back to BreezeLight
linux64:/home/stephan # exit
And with xdg-su as user:
stephan@linux64:~> xdg-su -c /usr/bin/qphotorec
stephan@linux64:~>
It depends on how exactly you became root.
How to remove the post has been posed
I’m doing xdg-su
in terminal which has been rooted for not to enter the password again.
Very, very strange. But it is your system.
There is no need - the discussion is useful.
I guess they want to keep at least one superruser-terminal running if one get accidentally closed.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.