PINE64
How to change the minimum password length when changing from default passwords - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: How to change the minimum password length when changing from default passwords (/showthread.php?tid=10719)



How to change the minimum password length when changing from default passwords - arturo2bodegas - 07-18-2020

Hey, guys...I'm trying to change my default passwords for default user and root...passwd isn't happy with my password length, yet it's longer than the default 4-character password...what gives? How can I change this requirement to allow for a shorter new password? Also, a related question...mobian is the default user...can I make a new user and have a multi-user system, or is mobian pretty much the only user apart from root that will work with this setup? on the top bar of phosh there's a grayed-out option to logout...wondering if that can be implemented?
Thanks in advance!


RE: How to change the minimum password length when changing from default passwords - devrtz - 07-18-2020

There is two things you can do regarding the password:
Code:
sudo passwd mobian
sudo passwd root
to circumvent the password policy. See the mobian wiki

Or you could change the password policy by editing '/etc/pam.d/common-password'  See this issue.

To change the user name you can either build an image yourself using this debos recipe and supplying '-u <USERNAME>' to the build script.

Alternatively you could probably use Jumpdrive, mount the root partition and then rename /home/mobian to /home/user and also update the /etc/passwd and /etc/shadow files. However do this at your own risk, since I have never tried it. Not sure if this breaks the auto-login of phosh (maybe you need to do some changes there as well).


RE: How to change the minimum password length when changing from default passwords - Boern - 07-18-2020

(07-18-2020, 11:04 AM)devrtz Wrote: Alternatively you could probably use Jumpdrive, mount the root partition and then rename /home/mobian to /home/user and also update the /etc/passwd and /etc/shadow files. However do this at your own risk, since I have never tried it. Not sure if this breaks the auto-login of phosh (maybe you need to do some changes there as well).

I did this and it worked. Phosh uses the uid to determine who to login. I don't remember whether changing shadow and passwd was enough. You'll probably need to change /etc/group as well. Just grep for mobian in etc.


RE: How to change the minimum password length when changing from default passwords - arturo2bodegas - 07-18-2020

I got it! Thanks. Yeah, user error on that one...I forgot to sudo for mobian and that's what threw up that error.