Page 1 of 2

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

Posted: 04 Jul 2014, 10:18
by tzok
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.

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

Posted: 04 Jul 2014, 13:21
by fanthom
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.

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

Posted: 04 Jul 2014, 15:02
by tzok
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.

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

Posted: 04 Jul 2014, 19:53
by fanthom
could you upload your dmde module somewhere so i could try to recreate the issue myself?

thanks

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

Posted: 04 Jul 2014, 20:10
by tzok
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

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

Posted: 05 Jul 2014, 10:42
by fanthom
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.

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

Posted: 05 Jul 2014, 21:02
by tzok
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...

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

Posted: 06 Jul 2014, 00:53
by Ed_P
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?

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

Posted: 06 Jul 2014, 18:17
by tzok
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.

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

Posted: 06 Jul 2014, 21:25
by wread
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!

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

Posted: 06 Jul 2014, 21:29
by tzok
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).

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

Posted: 07 Jul 2014, 20:00
by fanthom
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.

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

Posted: 07 Jul 2014, 20:35
by tzok
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.

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

Posted: 07 Jul 2014, 20:48
by fanthom
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.

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

Posted: 07 Jul 2014, 21:47
by tzok
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.