Subj : Re: Headless Pi 4B problems - continued To : Chris Green From : The Natural Philosopher Date : Sun Jan 26 2025 12:37:48 On 26/01/2025 10:42, Chris Green wrote: > This is getting ridiculous! > > Once upon a time one just copied an image to a card, enabled ssh and > hey presto, you could log in as user pi with password raspberry. > > No chance now. > > I would point out that I'm not, in general, a complete numpty. I've > been using Pis (and other similar things) for many many years. > > > So, having found out why the above simple approach doesn't work I have > tried:- > > Use rpi-imager, wasted first attempt because it wasn't obvious where > one entered user/password. Second attempt seemed to boot the Pi > OK but it never appeared on my LAN so not much help there. (At > least my first dd copied image appeared on the LAN) > > Manually editing userconf.txt with my /etc/shadow encrypted > password from my Linux box got to a login prompt but the password > is somehow wrong. > Ah. There may be gotchas in there like EOL charaters and spaces that have to be 'just right' I generally generate the encryption using the tools suggested. e.g. echo 'mypassword' | openssl passwd -6 -stdin echo 'raspberry' | openssl passwd -6 -stdin $6$5H2l9s5V5YBulBGU$xchi.2AQLn5P5IK/khNPC3uggf9dc5DjY9KKxZK7IdDPNV1Zzggaxg0DTstT8bpSMvRzUlc9vJ/mrPQPbfBX/ Note you never get the same string twice... Here is a userconf.txt with user pi password raspberry... pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0 > Finally I managed to get a login working by creating a > ~/.ssh/authorized keys file with the public key from my Linux > system in it. Phew! > Ultimately that is a smoother way to access the Pi anyway -- "The great thing about Glasgow is that if there's a nuclear attack it'll look exactly the same afterwards." Billy Connolly --- SoupGate-Win32 v1.05 * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3) .