We have moved to a new Sailfish OS Forum. Please start new discussions there.
25

HowTo: using su instead of devel-su

asked 2014-02-26 09:51:45 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2015-06-18 07:47:45 +0300

Upp15 gravatar image

Prerequisites

  1. Developer mode should be enabled

Instructions

Actually, su is already installed on Sailfish if developer mode is activated. But the password for root is not set by default so you can't use su out-of-the-box.

The steps to enable it are simple:

  1. Go to Settings->System->Developer mode.
  2. Enable Remote connection and set some password for it (it is actually a password for nemo user and will be used for devel-su password prompt).
  3. Go to Terminal and type:
    devel-su
    password from step 2
    passwd
  4. You will be asked to enter new password for root user two times (it has nothing to do with the password that you have set up in step 2 - choose whatever you like, but choose a really strong one!).
  5. The password for root is now set - don't forget it! You can now use su instead of devel-su to become root user.

Warning

After the root user is activated, Remote connection setting becomes obsolete. You don't need to turn it on and set password for root access to use su. And you can always connect to Sailfish via SSH as root user (of course it will still ask you for a root password) even when Remote connection is turned off.

edit retag flag offensive close delete

Comments

6

Because you cannot disable "Remote access" before connecting to networks you cannot trust (e.g. public WiFi networks, mobile providers that do not allocate private IP 4 addresses and block inter-user IP communication – assume, they do not, as long as you do not know they do), strangers could try to enter your phone via ssh and try passwords using an automated procedure until they have been successfully entering your phone.

It seems, so far there is no intrusion detection and prevention mechanism implemented in Sailfish. Think twice, whether you really want to open up ssh access to the handset in general.

PS: Thank you for this HowTo.

jgr ( 2014-02-27 00:24:47 +0300 )edit
2

The phone does have iptables (a firewall, for those not familiar with it) that you could configure to only allow incoming SSH connections from a specific IP address, or to only allow a couple of login attempts per IP over a set time period e.g. maximum 3 login attempts per hour per IP.

Regardless, I would advise caution as well. It is generally thought of as a very bad idea to allow the root user to directly SSH in - it's much better to only allow normal users remote SSH access and then su to become root once inside.

typo ( 2014-02-27 00:44:10 +0300 )edit
3

Out of curiosity: why su? What's wrong with devel-su?

typo ( 2014-02-27 00:47:20 +0300 )edit

Less characters to type ;)

J4ZZ ( 2014-02-27 02:23:37 +0300 )edit
1

you can create alias for devel-su ;)

barral ( 2014-02-27 10:47:08 +0300 )edit

5 Answers

Sort by » oldest newest most voted
9

answered 2014-05-01 12:46:31 +0300

Avathar gravatar image

updated 2014-05-01 12:48:23 +0300

Well if you look at the official how-to there is a critical step missing... of course it is obvious to many. but there is a critical step missing. If you enter devel-suand then try to enter passwd then you will never get su. You first have to enter your developer password.

Correct would be: enter 'devel-su' enter your developer password. Then enter 'passwd'. Then set a su/root password twice. Now you have a root password and can use '-su'

Newbies like me would learn to use linux and derivatives soooo much easier and faster if there were correct tutorials and how-to's

edit flag offensive delete publish link more
3

answered 2014-11-13 16:18:41 +0300

WhyNotHugo gravatar image

After doing this you really should disable remote password-only ssh logins for root:
Add to /etc/ssh/sshd_config:

 PermitRootLogin without-password
edit flag offensive delete publish link more
0

answered 2015-06-18 02:05:59 +0300

rumburak gravatar image

What is the correct command to exit devel-su? Or simply shut down a terminal?

edit flag offensive delete publish link more

Comments

2

Yep, just close the window or you can type exit or ctrl d

Spam Hunter ( 2015-06-18 02:15:55 +0300 )edit
0

answered 2015-08-25 07:53:10 +0300

RoestVrijStaal gravatar image

Is it possible to revert it back when something or somehow su-devel is needed?

edit flag offensive delete publish link more
-5

answered 2014-04-24 03:15:43 +0300

Avathar gravatar image

updated 2014-04-24 03:18:29 +0300

devel -su is an "unrecognized command" that is probably why you need to install zip file... total lunacy: the command should be included as a standard command.... linux huh... linux is spelled...doesnt work! ok so then "su" this is a recognized command...however I cant set the password. it just ISNT saved. and my password is strong. how is this possible? its linux so .... its possible. How can I get my password to be ACTUALLY saved in developer options??!!??

Oh btw its not linux that doesnt work... its the developers who cant think.

edit flag offensive delete publish link more

Comments

5

The command is "devel-su", not "devel -su".

kaltsi ( 2014-04-24 09:20:03 +0300 )edit
4

Haha, this post was actually pretty funny. Did you ever wonder what the -su switch was for to the "devel" command?

Did you try to install 'devel' then? LMFAO

Larswad ( 2014-04-24 16:38:14 +0300 )edit
2

great you found it funny: yes i thought it was an argument yes i thought there was a space. yes it was unclear yes it has been resolved, yes you should try not to act superior. yes you woiuld have to agree that compared to other os's linux is not for beginners, and is not user friendly and.... even how to's written by linux users routinely miss critical steps.....because... hey everybody knows that, dont they......

Avathar ( 2014-04-25 14:21:22 +0300 )edit
3

Take it easy, I'm not being condescending or acting superior. Just having fun on the account of someone else's misunderstandings. Don't worry, its an understandable mistake of course!

And by the way, remember you were the first one to claim others couldn't think?

Larswad ( 2014-04-30 15:24:07 +0300 )edit
5

@Avathar wow, you should take a step back, and reflect on who's being abnoxious and acting superior and righteous. You will not get very far with that attitude, not with people trying to help you, and not with the systems you're trying to learn. Learn some humility instead, will you!

dsilveira ( 2014-05-01 17:05:22 +0300 )edit
Login/Signup to Answer

Question tools

Follow
17 followers

Stats

Asked: 2014-02-26 09:51:45 +0300

Seen: 17,833 times

Last updated: Aug 25 '15