Devel-su: Origin, docs, flags?

We are writing an Ansible become-plugin for devel-su so that Sailfish OS is a possible target system for Ansible playbooks. Previously, hacks like changing sudoers or root login via SSH.

I can already spoil that it works :slight_smile:

Some questions arose, though:

  • Is devel-su a Sailfish OS-specific command, or does it have another upstream developer/maintainer?
  • Is there any documentation? Sailfish has no manpages, and the command does not understand -h or --help :confused:
  • Is it possible to switch to other users than root? If not, we can ignore become_user for devel-su.
  • Are there any other optional command line flags that could be set? If not, we can ignore become_flags.

I just installed sudo on the phone to make become work in ansible. But sudo is not installed by default on the device, that’s true.

strings /usr/bin/devel-su provides some hints:

  • It seems to recognise the option --privileged (whatever it does).
  • One can switch to any user (like su). Try, e.g., devel-su nemo (or defaultuser).
  • It also can evaluate something group related, not only user related.

Searching the WWW shows that it originates from Nokia, it was also deployed on N9 and N950 (which used the Maemo/MeeGo hybrid called “Harmattan”), maybe (I don’t remember) even the N900 (Maemo 5 “Fremantle”) and / or earlier Maemo releases.

rpm -qf /usr/bin/devel-su results in
jolla-developer-mode-X.Y.Z-A.B.C.jolla.armv7hl, which is a proprietary licensed package, see SailfishOSS - Mer Wiki.


devel-su was available on MeeGo 1.2 Harmattan (Nokia N9 & N900), but not on Maemo 5 Fremantle (N900) or earlier like Diablo (N8x0). You had to install rootsh on those, to gain root using root / sudo gainroot and install sudser to use sudo command.


-p for short. I’m sure i have seen that in some tips/tutorials here in the past.

That puts you temporarily in the privileged group, enabling access to stuff like account config etc.
This way you don’t have to become root to deal with user secrets, but they can still remain inaccessible by default.


Which AFAICS is the main difference to su or sudo from the PoV of management tools.

su can’t do that, and AFAICS sudo -E -g privileged would be similar but not equivalent.