DMDE won't run from root claiming that it requires superuser

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

DMDE won't run from root claiming that it requires superuser

Post#1 by tzok » 04 Jul 2014, 10:18

I've got a problem with the DMDE - it won't start from the root account claiming that it requires the superuser rights (original spelling):

Code: Select all

You need Administrator/Superuser priveleges to access devices.
Log in as an Administrator and run the program as an Administrator
(read the software documentation).
On Slax (either 6.x or 7.x) it works with no problems.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4625
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: DMDE won't run from root claiming that it requires super

Post#2 by fanthom » 04 Jul 2014, 13:21

hi tzok,

in Slax you work as root by default so extra privileges are not needed. in Porteus we use unprivileged 'guest' by default so you have to run your software as:

Code: Select all

kdesu/ktsuss/gtksu/(other suid helper) application_name
or logout->login as root, or boot with 'login=root' cheatcode.
Please add [Solved] to your thread title if the solution was found.

tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

Re: DMDE won't run from root claiming that it requires super

Post#3 by tzok » 04 Jul 2014, 15:02

I've forgot to say - my Porteus uses root account as default for X. DMDE is a console app, so I've tried to run it from text console (TTY1) being logged as a root - with no luck.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4625
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: DMDE won't run from root claiming that it requires super

Post#4 by fanthom » 04 Jul 2014, 19:53

could you upload your dmde module somewhere so i could try to recreate the issue myself?

thanks
Please add [Solved] to your thread title if the solution was found.

tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

Re: DMDE won't run from root claiming that it requires super

Post#5 by tzok » 04 Jul 2014, 20:10

I havent created the module, I've just unzipped the archive to the /opt/dmde directory. Here's the binary archive: http://dmde.com/download/dmde-free-2.8. ... 32-con.zip

User avatar
fanthom
Site Admin
Site Admin
Posts: 4625
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: DMDE won't run from root claiming that it requires super

Post#6 by fanthom » 05 Jul 2014, 10:42

checked and seems that it's not about missing root privileges but a way the app is accessing the drives. it is a kernel fault as using one from slax (slackware 'huge' kernel i believe) resolves the problem in porteus.
if you really need this app in porteus then please grab slax's kernel and compile aufs against it (make sure it's compiled directly into kernel to avoid modprobing in initrd) and it should work ok.

i have no idea which kernel feature is missing in porteus kernel (maybe some obsolete one) and this app seems to be not very popular so i'm not going to make our kernel compatible with it as it would be very time consuming task to find what's needed.

sorry about that.
Please add [Solved] to your thread title if the solution was found.

tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

Re: DMDE won't run from root claiming that it requires super

Post#7 by tzok » 05 Jul 2014, 21:02

fanthom wrote:if you really need this app in porteus then please grab slax's kernel and compile aufs against it (make sure it's compiled directly into kernel to avoid modprobing in initrd) and it should work ok.
I really need this app (as this is the best data recovery tool I know), actually I need a bootable USB with Linux mainly for this app. If someone else wants to - I've found a description how to do it:
http://www.porteus.org/tutorials/51-dev ... ernel.html

I'll beter just stick to the Slax...

User avatar
Ed_P
Contributor
Contributor
Posts: 3419
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: DMDE won't run from root claiming that it requires super

Post#8 by Ed_P » 06 Jul 2014, 00:53

tzok wrote:I really need this app (as this is the best data recovery tool I know)
hmmmm fanthom it sounds like it would be a worthwhile addition to Porteus. Maybe rethinking it would be worth the effort?
Ed

tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

Re: DMDE won't run from root claiming that it requires super

Post#9 by tzok » 06 Jul 2014, 18:17

The author of DMDE claims that the only check which is done to verify weather app is executed from superuser account is checking whether getuid() returns 0.

User avatar
wread
Module Guard
Module Guard
Posts: 1113
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: DMDE won't run from root claiming that it requires super

Post#10 by wread » 06 Jul 2014, 21:25

Why the author do not open the source? We could produce a Porteus module by compiling and packaging it after the Slackware model that runs ok in Porteus!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

Re: DMDE won't run from root claiming that it requires super

Post#11 by tzok » 06 Jul 2014, 21:29

It is a commercial (paid) software, free version has a limited functionality (i.e. automatic recovery of single files only). This is a very advanced tool, definitely not for beginners, you must know what you are doing when using this software. Anyways the only problem was in fact that the root account in Porteus has UID different than 0. Alternatively it is possible to disable this check in configuration file and program runs fine (but disabling a compatibility checks in a program that has a direct access to your disks generally is not the very best idea).

User avatar
fanthom
Site Admin
Site Admin
Posts: 4625
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: DMDE won't run from root claiming that it requires super

Post#12 by fanthom » 07 Jul 2014, 20:00

Anyways the only problem was in fact that the root account in Porteus has UID different than 0.
are you sure?

Code: Select all

root@porteus:/home/guest# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
root@porteus:/home/guest#
can't see anything wrong here.
Please add [Solved] to your thread title if the solution was found.

tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

Re: DMDE won't run from root claiming that it requires super

Post#13 by tzok » 07 Jul 2014, 20:35

So I have no idea where's the problem, as the DMDE author claims that there is no other check, and after disabling this check program works.

To even further ensure, I've written a simple program in C, that calls the mentioned getuid() function from unistd.h, and it also returns 0.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4625
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: DMDE won't run from root claiming that it requires super

Post#14 by fanthom » 07 Jul 2014, 20:48

i rather see it like:
application tries to access device -> cant do it (kernel fault as proven above) -> assumes the user has no superuser privileges.

i'm not the author of mentioned app so i can be wrong.
Please add [Solved] to your thread title if the solution was found.

tzok
White ninja
White ninja
Posts: 12
Joined: 04 Jul 2014, 10:03
Distribution: Porteus LXDE x32
Location: Poland

Re: DMDE won't run from root claiming that it requires super

Post#15 by tzok » 07 Jul 2014, 21:47

This is quoted answer of the DMDE Author:
Dmitry Sidorov wrote:The message you see means actually what it says - the software is not
run as root. More exactly: getuid()!=0. And nothing more.

If you read the documentation you know how to skip this check:
http://dmde.com/manual/setup.html

As I can see on Porteus getuid() may be nonzero even when run as root
however the software perfectly runs if skip the check. Instead there are
fantasies about the way the app is accessing the drives, about kernel
fault, obsolete kernel features, very time consuming task, etc. :)

To be true the check {getuid()!=0} is not a perfect solutions however it
allows avoiding questions when trying to run as non-root. The question
will be investigated more thoroughly to improve the solution.

Post Reply