Unable to login due to the password change
#1
Hello everyone,
I just have a quick question. Just got my new Pine64 UBports edition phone and after booting the phone first time I was prompted to enter a screen lock pin, which I did and chose 4 digits pin. After I boot into the UBPorts system, played around, opened terminal and went ahead and changed password for the main user by passwd command. After a while the screen was locked and in order to unlock it, you get a prompt to enter password. The initial 4 digit pin is not accepted, since I changed password. But, there is no way to enter new password (letters and digits) as the prompt only has digits option. There is no way to enter a new password which contains letters. I wasn't aware that the new password for the user will also apply as a screen unlock PIN. Now, I am stuck with no way to enter the system and need to reset it. What is the fastest way to factory reset UBports without full reinstall? Pressing Up Volume + Power Button get me "Installing update" screen which never disappear. In regular Androind phone you login to a bootloader and just factory reset system. Could anyone suggest how to factory reset UT system instead of full reinstall? Also, why screen lock pin is the same as a user password?
Thank you.
#2
Also, tried to telnet 172.16.42.1 and use passwd command to change to old password/pin. The command is not in the list of working commands there. Any suggestions as to how to reset system or change password by connecting to the phone would be appreciated.
Cheers!
#3
(07-23-2020, 04:31 PM)pine_usr Wrote: Hello everyone,
I just have a quick question. Just got my new Pine64 UBports edition phone and after booting the phone first time I was prompted to enter a screen lock pin, which I did and chose 4 digits pin. After I boot into the UBPorts system, played around, opened terminal and went ahead and changed password for the main user by passwd command. After a while the screen was locked and in order to unlock it, you get a prompt to enter password. The initial 4 digit pin is not accepted, since I changed password. But, there is no way to enter new password (letters and digits) as the prompt only has digits option. There is no way to enter a new password which contains letters. I wasn't aware that the new password for the user will also apply as a screen unlock PIN. Now, I am stuck with no way to enter the system and need to reset it. What is the fastest way to factory reset UBports without full reinstall? Pressing Up Volume + Power Button get me "Installing update" screen which never disappear. In regular Androind phone you login to a bootloader and just factory reset system. Could anyone suggest how to factory reset UT system instead of full reinstall? Also, why screen lock pin is the same as a user password?
Thank you.

Hey @pine_usr

I did the same thing!

Easy fix if it is an sdcard OS:

  1. 1st turn off phone.
  2. Take out sdcard.
  3. insert/mount sdcard for editing
  4. backup /etc/shadow by renaming it /etc/shadow.bak or something similar
  5. move /etc/shadow- to /etc/shadow to replace (/etc/shadow- is a backup of original)
  6. put sdcard back into phone
  7. login with original default number

    Outside that you can try to do the same remotely logging in if not running off sdcard.
- RTP

"In the beginner's mind there are many possibilities, in the expert's mind there are few." -Shunryu Suzuki

My Blog: https://politictech.wordpress.com
#4
(07-28-2020, 06:27 PM)RTP Wrote:
(07-23-2020, 04:31 PM)pine_usr Wrote: Hello everyone,
I just have a quick question. Just got my new Pine64 UBports edition phone and after booting the phone first time I was prompted to enter a screen lock pin, which I did and chose 4 digits pin. After I boot into the UBPorts system, played around, opened terminal and went ahead and changed password for the main user by passwd command. After a while the screen was locked and in order to unlock it, you get a prompt to enter password. The initial 4 digit pin is not accepted, since I changed password. But, there is no way to enter new password (letters and digits) as the prompt only has digits option. There is no way to enter a new password which contains letters. I wasn't aware that the new password for the user will also apply as a screen unlock PIN. Now, I am stuck with no way to enter the system and need to reset it. What is the fastest way to factory reset UBports without full reinstall? Pressing Up Volume + Power Button get me "Installing update" screen which never disappear. In regular Androind phone you login to a bootloader and just factory reset system. Could anyone suggest how to factory reset UT system instead of full reinstall? Also, why screen lock pin is the same as a user password?
Thank you.

Hey @pine_usr

I did the same thing!

Easy fix if it is an sdcard OS:

  1. 1st turn off phone.
  2. Take out sdcard.
  3. insert/mount sdcard for editing
  4. backup /etc/shadow by renaming it /etc/shadow.bak or something similar
  5. move /etc/shadow- to /etc/shadow to replace (/etc/shadow- is a backup of original)
  6. put sdcard back into phone
  7. login with original default number

    Outside that you can try to do the same remotely logging in if not running off sdcard.
As I mentioned in my initial post the OS installed on eMMC internal card, not sdcard. How renaming /etc/passwd file can help to login with initial only digits PIN?
Can any one provide clear solution for resetting / factory reset of UBPorts in order to be able to login into installed on internal card OS. There is still no clear solution for this seemingly common problem people have. I've noticed another post with the same problem. How in the world developers did come with the solution to use screen lock same as the OS user password and didn't think about providing a normal keyboard layout for entering password?
Again, no clear solution, any help to resolve this issue would be appreciated. Of course, flashing/reinstalling/booting from sdcard would help, but there should be easier solution to this problem.
Thanks.
#5
Use Jumpdrive to either reflash and start over, or to mount the internal storage on a computer and null out the password hash in /etc/shadow.

https://wiki.pine64.org/index.php?title=...structions

From what I remember, UBPorts does support alphanumeric passphrases, but you have to select that option in the settings. Otherwise, you won't get the correct keyboard on the lock screen.
#6
I wonder if you boot from microSD do you have access to eMMC disk? so then you would have access to files, fix, and remove microSD, to boot in your previous system without the need to reinstall.
#7
(08-02-2020, 10:31 PM)YepYepperson Wrote: Use Jumpdrive to either reflash and start over, or to mount the internal storage on a computer and null out the password hash in /etc/shadow.

https://wiki.pine64.org/index.php?title=...structions

From what I remember, UBPorts does support alphanumeric passphrases, but you have to select that option in the settings. Otherwise, you won't get the correct keyboard on the lock screen.
Yes, I installed jumpdrive, but what are the specific commands I can use to mount eMMC in the computer? Also, there is not enough info for telnet options. Is there an option to factory reset UBPorts via telnet? When connected it looks like many usual Linux commands are not available.
Please advise.
Thanks.

(08-03-2020, 08:16 AM)daniel Wrote: I wonder if you boot from microSD do you have access to eMMC disk? so then you would have access to files, fix, and remove microSD, to boot in your previous system without the need to reinstall.

Yes, I understand your concept. Boot from SD card navigate to eMMC file tree and edit the /etc/passwd/ file? Need to try this out. Will update later.
Thanks.
#8
Out of curiosity, I put UBports back on my eMMC to try it for myself. If you use Jumpdrive and connect the phone to a computer, then the steps are as follows (this assumes you have a Linux PC. If you're on Windows, you might want to do this in a Linux VM with USB passthrough via Virtualbox or other hypervisor, as the filesystem is Ext4):

1) Pull off the phone back, take out the battery, insert the microSD card which contains Jumpdrive, and put the cover back on
2) Connect the phone to a computer via the USB-C cable so it turns on
3) # mkdir tmp
4) # sudo mount /dev/sdc10 tmp (Assuming your eMMC is sdc. Do a "sudo fdisk -l" to find out)
5) # sudo nano tmp/system-data/var/lib/extrausers/shadow
6) ---> phablet:::0:99999:7::: (Erase the password hash entirely so it looks like this, where the entire field between the colons is gone, then save)
7) # sudo umount tmp

8)  Pull the phone apart again, take out microSD, restart phone and you won't have a lock screen password anymore.

Then, open the System Settings app, go into Security & Privacy, and change the Locking option from Swipe to Passphrase. You'll get the regular alpha-numeric keyboard when unlocking afterwards.
#9
>
> /dev/sdc10
> system-data/var/lib/extrausers/shadow
>

Thanks @YepYepperson for the Info. I took me nearly the entire day to find this path. Undecided

But now I am able to set a new password to my pinephone. Thanks!
#10
I found if I plugged the phone into my computer, turned it off, and then on again, then when it came back on it bypassed the lock screen, allowing me to go in and change the password.

Found this out since my computer wouldn't recognize my phone and I couldn't ssh in...quicker fix though!


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fix for online account login Nooblife 0 80 06-13-2021, 06:34 AM
Last Post: Nooblife
  Unable to make a phone call bingo600 4 2,574 07-23-2020, 10:18 AM
Last Post: israel
  SSH wont connect [Permission denied (publickey,password)]. LMalilil 3 2,223 06-23-2020, 12:27 PM
Last Post: LMalilil

Forum Jump:


Users browsing this thread: 1 Guest(s)