0

I am using Raspbian Bullseye on my Raspberry Pi 4b, and in the last few days it has been changing the password by itself.

I have a headless setup, so I can only connect via SSH, and sometimes, several times a day, when I try to connect it just gives Permission denied, please try again.. I assumed a different issue at first, but after extracting the microSD and changing the /etc/shadow to some known password's hash I am able to gain access again, but this really gets in the way of work.

I know for a fact that I am not just forgetting the password, it is only one letter, I don't really need it very much at all, but this first happened when I was using a password-less setup.

What can be done?

3
  • are you able to see that the shadow file changes from what you set it to?
    – Chad G
    Commented Aug 16, 2023 at 15:06
  • When I looked into the shadow file it just had ! in the place of the password hash, I am not sure where I can see the password hash at that time
    – mrRandom
    Commented Aug 16, 2023 at 16:10
  • a ! or * or any invalid hash for that matter disables login using password Commented Aug 17, 2023 at 0:03

1 Answer 1

-1

The password is tested for complexity.
As a general guideline, passwords should consist of 6 to 8 characters including one or more characters from each of the following sets:
• lower case alphabetics
• digits 0 thru 9
• punctuation marks

passwd will reject any password which is not suitably complex.

5
  • What has this to do with "it has been changing the password by itself."
    – MatsK
    Commented Aug 31, 2023 at 6:09
  • @MatsK The OP stated "the password … is only one letter" so the password was never set.
    – Milliways
    Commented Aug 31, 2023 at 6:57
  • You can change the policy and use one letter password!
    – MatsK
    Commented Aug 31, 2023 at 7:04
  • @MatsK "You can change the policy and use one letter password" if you are sufficiently experienced which the OP does not appear to be. Far better to explain WHY his attempt to use a single letter failed.
    – Milliways
    Commented Aug 31, 2023 at 7:13
  • You need to READ the OPs question again !
    – MatsK
    Commented Aug 31, 2023 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.