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

[SOLVED] Auth failed for Root user or devel-su in Terminal app

asked 2018-05-24 22:16:08 +0200

jimjamz gravatar image

updated 2018-05-31 00:36:31 +0200

Scenario:  Use Terminal app to su to Root or devel-su via PC
  Given I have enabled 'Developer Mode' on the device
  And I have enabled 'Remote connection'
  And the Remote Connection Password is "blah"
  And I connect the device to a PC via USB
  And on the PC, I submit `ifconfig usb0 inet 192.168.2.14`
  When I SSH as nemo to 192.168.2.15
  And I submit `devel-su`
  And I enter the password "blah"
  Then I am root

Scenario:  Use Terminal app to su to Root or devel-su via Terminal app
  Given I have enabled 'Developer Mode' on the device
  And I have enabled 'Remote connection'
  And the Remote Connection Password is "blah"
  When I open the Terminal app
  And I submit `devel-su`
  And I enter the password "blah"
  EXPECTED: Then I am root
  ACTUAL: But I receive "Auth failed"
edit retag flag offensive close delete

Comments

havent experienced that on my devices (J1, official SFOSX, Oneplus X, Nexus 4) Which device are you on ?

Nieldk ( 2018-05-25 07:22:39 +0200 )edit

Is this reproduceable?

Also, did you try with a password that is actually as simple as "blah"? Just so we can rule out things like a different keyboard layout sending a different (wrong) password.

nephros ( 2018-05-30 12:45:43 +0200 )edit

@Nieldk - I'm using SFOSX on Xperia X.

jimjamz ( 2018-05-30 23:42:20 +0200 )edit

@nephros - I tried combinations of passwords. Mostly, I tried the randomly generated sorts that are provided when Developer Mode's Remote Connection feature is enabled or restarted. This is usually a combination of lower/uppercase characters and numbers.

jimjamz ( 2018-05-30 23:46:20 +0200 )edit

So, I tried creating my own simple 1-character password, and this works. However, when generating passwords, I will always receive "Auth Failed". Before you ask, I'm not typing these incorrectly. I'll explain more in the "answer", although it's not technically the answer as it raised more questions.

jimjamz ( 2018-05-30 23:50:19 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2018-05-31 00:18:30 +0200

jimjamz gravatar image

updated 2018-05-31 00:25:22 +0200

Although this really isn't the answer, it seems the issue is when using a password that is randomly generated by the OS. When using a manually entered password, this is accepted by the Terminal app when attempting to switch to Root. Apologies, as I had not correctly tested the scenario of manually entering a password. I thought this was also erroneous. Here are the actual test scenarios:

@success
Scenario:  Use Terminal app to su to Root or devel-su via Terminal app
  Given I have enabled 'Developer Mode' on the device
  And I have enabled 'Remote connection'
  And I enter "a" in the "Set password for SSH root access" field
  When I open the Terminal app
  And I submit `devel-su`
  And I enter "a"
  Then I am root

@bug
Scenario:  Use Terminal app to su to Root or devel-su via Terminal app
  Given I have enabled 'Developer Mode' on the device
  And I have enabled 'Remote connection'
  And I select "Generate" to generate a new password
  When I open the Terminal app
  And I submit `devel-su`
  And I enter the generated password
  EXPECTED: Then I am root
  ACTUAL: But I receive "Auth failed"

However, during testing, I have noticed another potential bug. It seems that the manually entered passwords are not visible in the Developer Tools settings once set.

@success
Scenario:  Check to ensure saved Remote Connection password is visible
  Given I have enabled 'Developer Mode' on the device
  And I have enabled 'Remote connection'
  And I am on the "Developer Tools" page
  When I select "Generate" to generate a new password
  And I enter the correct security code
  And I navigate back to the "Settings" page
  And I navigate to the "Developer Tools" page
  Then I should see the generated password

@bug
Scenario:  Check to ensure saved Remote Connection password is visible
  Given I have enabled 'Developer Mode' on the device
  And I have enabled 'Remote connection'
  And I am on the "Developer Tools" page
  When I enter "a" in the "Set password for SSH root access" field
  And I select "Save"
  And I enter the correct security code
  And I navigate back to the "Settings" page
  And I navigate to the "Developer Tools" page
  EXPECTED:   Then I should see the password "a"
  ACTUAL: I see an empty password field with the pre-text "Set password for SSH root access"

I can confirm "a" is actually set, although I cannot see it in Developer Tools, by going to the Terminal app, using devel-su and entering "a" as Root's password and it succeeds. Shall I raise this as a separate bug?

edit flag offensive delete publish link more

Comments

Thanks, that also helped me!

illyrion ( 2020-01-31 19:13:46 +0200 )edit
0

answered 2018-05-31 00:35:53 +0200

jimjamz gravatar image

I was able to solve the problem with the generated password not being accepted when attempting to su to root using the Terminal app.

  1. Generated a password -> su to root -> "Auth failed"

  2. Manually entered a password -> su to root -> [root]$

  3. Generated a password -> su to root -> "Auth failed"

  4. Manually entered a password -> su to root -> [root]$

  5. Generated a password -> Generated another password -> su to root -> [root]$

  6. Manually entered a password -> su to root -> [root]$

  7. Generated a password -> su to root -> [root]$

Unfortunately, I am no longer able to reproduce the initial issue I was seeing so I can't really call it a bug. I am able to generate a single new password and authenticate as root. I don't know how, but the second successive password generation in step 5 seemed to have done the trick.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2018-05-24 22:16:08 +0200

Seen: 1,141 times

Last updated: May 31 '18