• Can't get into headless pi, password not 'raspberry'

    From Chris Green@cl@isbd.net to comp.sys.raspberry-pi on Sat Jan 25 22:34:53 2025
    From Newsgroup: comp.sys.raspberry-pi

    I am trying to set up a new, headless Pi 4B. I have copied the 'lite'
    image to a USB drive and created the empty 'ssh' file in the boot
    partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?
    --
    Chris Green
    ·
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Townley@news@cct-net.co.uk to comp.sys.raspberry-pi on Sat Jan 25 23:56:03 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 25/01/2025 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite'
    image to a USB drive and created the empty 'ssh' file in the boot
    partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?

    There is no longer a default user in current images. When you sue the Raspberry Pi Imager, you must use the option to set a user and password,
    and if needed to enable ssh
    --
    Chris
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Pancho@Pancho.Jones@proton.me to comp.sys.raspberry-pi on Sun Jan 26 00:02:59 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 1/25/25 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite'
    image to a USB drive and created the empty 'ssh' file in the boot
    partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?


    Use the Raspberry Pi Imager, it is good. That allows you to do some boot provisioning, this is a more up to date version of the ssh file in boot.
    I think there is a .yml provisioning file, but I get confused between different OSes.

    The other way is to use a .ssh/authorized_keys file, with an appropriate
    key set up on the machine you are coming from.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From bp@bp@www.zefox.net to comp.sys.raspberry-pi on Sun Jan 26 01:28:39 2025
    From Newsgroup: comp.sys.raspberry-pi

    Chris Green <cl@isbd.net> wrote:
    [regarding getting into a pi]


    Any ideas, or other ways to get into it?


    Since nobody else brought it up, a serial console is
    useful in this context and also as a maintenance tool.

    hth,

    bob prohaska

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Lawrence D'Oliveiro@ldo@nz.invalid to comp.sys.raspberry-pi on Sun Jan 26 02:13:26 2025
    From Newsgroup: comp.sys.raspberry-pi

    On Sat, 25 Jan 2025 22:34:53 +0000, Chris Green wrote:

    I can edit files on the USB drive OK so I can add and modify entries in /etc/passwd and /etc/shadow. So all I actually need to do is set it up
    so the user 'pi' has no password but I'm not doing too well at doing
    that at the moment.

    Try putting this in the password field in the /etc/shadow file:

    $y$j9T$7FOBvVykAYTWGfCHpB2tJ.$/cOEl5X64TU2daBOxeP.hfgF90h23GeLBxFmJI0TVP4

    (that’s a hash for “raspberry”.)

    The hash was produced with my code from here
    <https://gitlab.com/ldo/nixcrypt>. The various hash algorithms that
    should be available are documented here
    <https://manpages.debian.org/crypt(5)>.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.raspberry-pi on Sun Jan 26 09:15:20 2025
    From Newsgroup: comp.sys.raspberry-pi

    In article <vn45o5$37klv$5@dont-email.me>,
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 25 Jan 2025 22:34:53 +0000, Chris Green wrote:

    I can edit files on the USB drive OK so I can add and modify
    entries in /etc/passwd and /etc/shadow. So all I actually need to
    do is set it up so the user 'pi' has no password but I'm not
    doing too well at doing that at the moment.

    Try putting this in the password field in the /etc/shadow file:

    $y$j9T$7FOBvVykAYTWGfCHpB2tJ.$/cOEl5X64TU2daBOxeP.hfgF90h23GeLBxFmJI0TVP4

    (thats a hash for raspberry.)

    The hash was produced with my code from here <https://gitlab.com/ldo/nixcrypt>. The various hash algorithms that
    should be available are documented here <https://manpages.debian.org/crypt(5)>.

    Question if I may? How do you get to the /etc/shadow file if you
    can't log in to the pi?

    Probably a couple of years ago now I created my own userconf file
    which along with an empty SSH file I drop into a newly burnt SD card.
    This works just fine for me but I would love to know how get to
    anything on the other partition without logging in. I am unaware of
    any way to see the main partition when the SD card is plugged into a
    PC.

    Thanks.

    Bob.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Sun Jan 26 09:23:22 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 25/01/2025 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite'
    image to a USB drive and created the empty 'ssh' file in the boot
    partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?


    Others have told you how to use the imager, but IIRC all that does is
    set up a file in the VFAT partition....

    Here is a shameless cut'n paste

    Write the Raspberry Pi OS image to your SD card as normal
    Mount the newly written /boot partition on the Pi on your computer
    Create an empty file named ssh, without a file type / ending. On
    Linux and macOS, this is easily done with touch ssh if you’re in the
    right directory. This tells the OS to enable SSH access right away.
    Next, create a user with a password on the SD card as that’s not
    done automatically anymore.
    Create an encrypted password for your new Raspberry Pi user. On
    Linux and macOS, this can be done with OpenSSL. For added security,
    write the new password into a masked shell variable so it doesn’t show
    up in your computer’s shell history:

    [morph@void ~]$ read -s pw
    [morph@void ~]$ echo "$pw" | openssl passwd -6 -stdin

    $6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1

    the long random string is your encrypted password. Next, create another file next to the ssh file on the SD card’s boot partition named userconf.txt.
    Open userconf.txt with your favourite text editor and in the
    first and only line enter your desired username and the encrypted
    password, separated by a colon. It should look like this: morph:$6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1

    And that’s it. Unmount your card, pop it into the Pi, connect it to your network and boot. You should now be able to SSH into it using your new credentials. No monitor needed.
    --
    To ban Christmas, simply give turkeys the vote.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Green@cl@isbd.net to comp.sys.raspberry-pi on Sun Jan 26 09:47:57 2025
    From Newsgroup: comp.sys.raspberry-pi

    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 25/01/2025 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite' image to a USB drive and created the empty 'ssh' file in the boot partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?


    Others have told you how to use the imager, but IIRC all that does is
    set up a file in the VFAT partition....

    Here is a shameless cut'n paste

    Write the Raspberry Pi OS image to your SD card as normal
    Mount the newly written /boot partition on the Pi on your computer
    Create an empty file named ssh, without a file type / ending. On
    Linux and macOS, this is easily done with touch ssh if you’re in the
    right directory. This tells the OS to enable SSH access right away.
    Next, create a user with a password on the SD card as that’s not
    done automatically anymore.
    Create an encrypted password for your new Raspberry Pi user. On Linux and macOS, this can be done with OpenSSL. For added security,
    write the new password into a masked shell variable so it doesn’t show
    up in your computer’s shell history:

    [morph@void ~]$ read -s pw
    [morph@void ~]$ echo "$pw" | openssl passwd -6 -stdin

    $6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1


    the long random string is your encrypted password. Next, create another file next to the ssh file on the SD card’s boot partition named userconf.txt.
    Open userconf.txt with your favourite text editor and in the
    first and only line enter your desired username and the encrypted
    password, separated by a colon. It should look like this: morph:$6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1


    And that’s it. Unmount your card, pop it into the Pi, connect it to your network and boot. You should now be able to SSH into it using your new credentials. No monitor needed.

    I think an ssh key will be easier! :-)
    --
    Chris Green
    ·
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Green@cl@isbd.net to comp.sys.raspberry-pi on Sun Jan 26 09:42:38 2025
    From Newsgroup: comp.sys.raspberry-pi

    Pancho <Pancho.Jones@proton.me> wrote:
    On 1/25/25 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite' image to a USB drive and created the empty 'ssh' file in the boot partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?


    Use the Raspberry Pi Imager, it is good. That allows you to do some boot provisioning, this is a more up to date version of the ssh file in boot.
    I think there is a .yml provisioning file, but I get confused between different OSes.

    The other way is to use a .ssh/authorized_keys file, with an appropriate
    key set up on the machine you are coming from.

    Yes, .ssh/authorized_keys would seem to be the way to go, thanks.
    --
    Chris Green
    ·
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Green@cl@isbd.net to comp.sys.raspberry-pi on Sun Jan 26 09:46:59 2025
    From Newsgroup: comp.sys.raspberry-pi

    Bob Latham <bob@sick-of-spam.invalid> wrote:
    In article <vn45o5$37klv$5@dont-email.me>,
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 25 Jan 2025 22:34:53 +0000, Chris Green wrote:

    I can edit files on the USB drive OK so I can add and modify
    entries in /etc/passwd and /etc/shadow. So all I actually need to
    do is set it up so the user 'pi' has no password but I'm not
    doing too well at doing that at the moment.

    Try putting this in the password field in the /etc/shadow file:

    $y$j9T$7FOBvVykAYTWGfCHpB2tJ.$/cOEl5X64TU2daBOxeP.hfgF90h23GeLBxFmJI0TVP4

    (that?s a hash for ?raspberry?.)

    The hash was produced with my code from here <https://gitlab.com/ldo/nixcrypt>. The various hash algorithms that
    should be available are documented here <https://manpages.debian.org/crypt(5)>.

    Question if I may? How do you get to the /etc/shadow file if you
    can't log in to the pi?

    By editing it in the file system that appears when you plug the USB stick
    into a PC, easy! :-)

    Probably a couple of years ago now I created my own userconf file
    which along with an empty SSH file I drop into a newly burnt SD card.
    This works just fine for me but I would love to know how get to
    anything on the other partition without logging in. I am unaware of
    any way to see the main partition when the SD card is plugged into a
    PC.

    Both partitions appear when I plug it into my Linux boxes, e.g. when
    this particular USB is plugged in I see:-

    /media/chris/Transcend/rootfs
    /media/chris/Transcend/bootfs
    --
    Chris Green
    ·
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Green@cl@isbd.net to comp.sys.raspberry-pi on Sun Jan 26 09:41:23 2025
    From Newsgroup: comp.sys.raspberry-pi

    Chris Townley <news@cct-net.co.uk> wrote:
    On 25/01/2025 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite' image to a USB drive and created the empty 'ssh' file in the boot partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?

    There is no longer a default user in current images. When you sue the Raspberry Pi Imager, you must use the option to set a user and password,
    and if needed to enable ssh

    Ah, that would explain it, thanks. I just used dd to create the
    image, I'll have to add a user and so on. OK, no problem.
    --
    Chris Green
    ·
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Andy Burns@usenet@andyburns.uk to comp.sys.raspberry-pi on Sun Jan 26 09:48:34 2025
    From Newsgroup: comp.sys.raspberry-pi

    Chris Townley wrote:

    When you sue the Raspberry Pi Imager, you must use the option to set a
    user and password


    Last time I used it, it would let you enter "root" for the username,
    but it wouldn't set the password for root.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Sun Jan 26 09:57:58 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 26/01/2025 09:47, Chris Green wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 25/01/2025 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite'
    image to a USB drive and created the empty 'ssh' file in the boot
    partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it
    up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?


    Others have told you how to use the imager, but IIRC all that does is
    set up a file in the VFAT partition....

    Here is a shameless cut'n paste

    Write the Raspberry Pi OS image to your SD card as normal
    Mount the newly written /boot partition on the Pi on your computer
    Create an empty file named ssh, without a file type / ending. On
    Linux and macOS, this is easily done with touch ssh if you’re in the
    right directory. This tells the OS to enable SSH access right away.
    Next, create a user with a password on the SD card as that’s not
    done automatically anymore.
    Create an encrypted password for your new Raspberry Pi user. On
    Linux and macOS, this can be done with OpenSSL. For added security,
    write the new password into a masked shell variable so it doesn’t show
    up in your computer’s shell history:

    [morph@void ~]$ read -s pw
    [morph@void ~]$ echo "$pw" | openssl passwd -6 -stdin

    $6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1


    the long random string is your encrypted password. Next, create
    another file next to the ssh file on the SD card’s boot partition named
    userconf.txt.
    Open userconf.txt with your favourite text editor and in the
    first and only line enter your desired username and the encrypted
    password, separated by a colon. It should look like this:
    morph:$6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1


    And that’s it. Unmount your card, pop it into the Pi, connect it to your >> network and boot. You should now be able to SSH into it using your new
    credentials. No monitor needed.

    I think an ssh key will be easier! :-)


    I didn't find it so.


    Essentially you need to create a file userconf.txt with one line

    user:<encrypted password>

    in the root of the VFAT boot partition

    And if you have a linux system already, you can cut and paste it out of
    your own /etc/shadow

    Plus an empty file called ssh. Using 'touch ssh'

    Hardly rocket science
    --
    Climate is what you expect but weather is what you get.
    Mark Twain

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Sun Jan 26 10:01:35 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 26/01/2025 09:48, Andy Burns wrote:
    Chris Townley wrote:

    When you sue the Raspberry Pi Imager, you must use the option to set a
    user and password


    Last time I used  it, it would let you enter "root" for the username,
    but it wouldn't set the password for root.

    I believe that is the case.

    It is actually quite handy to have a spare keyboard and HDMI monitor
    when bringing up headless.

    And suitable adapters.

    But its not actually needed
    --
    Any fool can believe in principles - and most of them do!



    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Green@cl@isbd.net to comp.sys.raspberry-pi on Sun Jan 26 10:09:33 2025
    From Newsgroup: comp.sys.raspberry-pi

    Chris Green <cl@isbd.net> wrote:
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    In article <vn45o5$37klv$5@dont-email.me>,
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 25 Jan 2025 22:34:53 +0000, Chris Green wrote:

    I can edit files on the USB drive OK so I can add and modify
    entries in /etc/passwd and /etc/shadow. So all I actually need to
    do is set it up so the user 'pi' has no password but I'm not
    doing too well at doing that at the moment.

    Try putting this in the password field in the /etc/shadow file:

    $y$j9T$7FOBvVykAYTWGfCHpB2tJ.$/cOEl5X64TU2daBOxeP.hfgF90h23GeLBxFmJI0TVP4

    (that?s a hash for ?raspberry?.)

    The hash was produced with my code from here <https://gitlab.com/ldo/nixcrypt>. The various hash algorithms that should be available are documented here <https://manpages.debian.org/crypt(5)>.

    Question if I may? How do you get to the /etc/shadow file if you
    can't log in to the pi?

    By editing it in the file system that appears when you plug the USB stick into a PC, easy! :-)

    Probably a couple of years ago now I created my own userconf file
    which along with an empty SSH file I drop into a newly burnt SD card.
    This works just fine for me but I would love to know how get to
    anything on the other partition without logging in. I am unaware of
    any way to see the main partition when the SD card is plugged into a
    PC.

    Both partitions appear when I plug it into my Linux boxes, e.g. when
    this particular USB is plugged in I see:-

    /media/chris/Transcend/rootfs
    /media/chris/Transcend/bootfs

    Oops, just rebuilt it and they are:-

    /media/chris/bootfs/
    /media/chris/rootfs/
    --
    Chris Green
    ·
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Green@cl@isbd.net to comp.sys.raspberry-pi on Sun Jan 26 10:14:07 2025
    From Newsgroup: comp.sys.raspberry-pi

    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 26/01/2025 09:47, Chris Green wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 25/01/2025 22:34, Chris Green wrote:
    I am trying to set up a new, headless Pi 4B. I have copied the 'lite' >>> image to a USB drive and created the empty 'ssh' file in the boot
    partition.

    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    I can edit files on the USB drive OK so I can add and modify entries
    in /etc/passwd and /etc/shadow. So all I actually need to do is set it >>> up so the user 'pi' has no password but I'm not doing too well at
    doing that at the moment.

    Any ideas, or other ways to get into it?


    Others have told you how to use the imager, but IIRC all that does is
    set up a file in the VFAT partition....

    Here is a shameless cut'n paste

    Write the Raspberry Pi OS image to your SD card as normal
    Mount the newly written /boot partition on the Pi on your computer
    Create an empty file named ssh, without a file type / ending. On
    Linux and macOS, this is easily done with touch ssh if you’re in the
    right directory. This tells the OS to enable SSH access right away.
    Next, create a user with a password on the SD card as that’s not
    done automatically anymore.
    Create an encrypted password for your new Raspberry Pi user. On >> Linux and macOS, this can be done with OpenSSL. For added security,
    write the new password into a masked shell variable so it doesn’t show >> up in your computer’s shell history:

    [morph@void ~]$ read -s pw
    [morph@void ~]$ echo "$pw" | openssl passwd -6 -stdin

    $6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1



    the long random string is your encrypted password. Next, create >> another file next to the ssh file on the SD card’s boot partition named >> userconf.txt.
    Open userconf.txt with your favourite text editor and in the
    first and only line enter your desired username and the encrypted
    password, separated by a colon. It should look like this:
    morph:$6$4E2z6hQOGLZCK5ZN$ESo2r/tO7Sy1Xmyp/bFzQ0A8zNNMhOoj0XocoGVbc8PVLcHlDr/kQiRvv/vOfdopLkylTVQSfK4n97SR9VGGF1



    And that’s it. Unmount your card, pop it into the Pi, connect it to your >> network and boot. You should now be able to SSH into it using your new
    credentials. No monitor needed.

    I think an ssh key will be easier! :-)


    I didn't find it so.


    Essentially you need to create a file userconf.txt with one line

    user:<encrypted password>

    in the root of the VFAT boot partition

    And if you have a linux system already, you can cut and paste it out of your own /etc/shadow

    Plus an empty file called ssh. Using 'touch ssh'

    Hardly rocket science

    True, I'm trying it now as my rpi-imager experience isn't being very
    fruitful at the moment.
    --
    Chris Green
    ·
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Bob Latham@bob@sick-of-spam.invalid to comp.sys.raspberry-pi on Sun Jan 26 10:21:02 2025
    From Newsgroup: comp.sys.raspberry-pi

    In article <jtch6l-udb2.ln1@q957.zbmc.eu>,
    Chris Green <cl@isbd.net> wrote:
    Bob Latham <bob@sick-of-spam.invalid> wrote:

    Question if I may? How do you get to the /etc/shadow file if you
    can't log in to the pi?

    By editing it in the file system that appears when you plug the USB
    stick into a PC, easy! :-)

    Erm, not here!

    My PC can read and write the FAT32 bootFS which is how I can add both
    SSH and userconf files. But the other partition, ext4 rootfs is
    invisible on my PC.

    Probably a couple of years ago now I created my own userconf file
    which along with an empty SSH file I drop into a newly burnt SD
    card. This works just fine for me but I would love to know how
    get to anything on the other partition without logging in. I am
    unaware of any way to see the main partition when the SD card is
    plugged into a PC.

    Both partitions appear when I plug it into my Linux boxes, e.g. when
    this particular USB is plugged in I see:-

    /media/chris/Transcend/rootfs
    /media/chris/Transcend/bootfs

    Oh, So you mean a Linux PC, that I can believe but I don't know
    anyone who has such a beast, I've not even seen one. Apple-mac or
    Windows without exception in my acquaintances and all would think a
    'PC' meant windows.

    Before anyone makes the obvious claim, in my eyes a pi doesn't
    qualify as a PC.

    Bob.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Sun Jan 26 12:23:22 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 26/01/2025 10:21, Bob Latham wrote:
    By editing it in the file system that appears when you plug the USB
    stick into a PC, easy! 🙂
    Erm, not here!

    My PC can read and write the FAT32 bootFS which is how I can add both
    SSH and userconf files. But the other partition, ext4 rootfs is
    invisible on my PC.

    Ah. Yes. From Windows only the VFAT boot partition is (normally)
    visible. But thats where you plonk userconf.txt so it should all work OK.

    Generating the password may not be so easy - not sure what tools windows
    has for that.

    I wonder if a blank password would work?
    --
    Socialism is the philosophy of failure, the creed of ignorance and the
    gospel of envy.

    Its inherent virtue is the equal sharing of misery.

    Winston Churchill


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Chris Townley@news@cct-net.co.uk to comp.sys.raspberry-pi on Sun Jan 26 12:37:00 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 26/01/2025 09:48, Andy Burns wrote:
    Chris Townley wrote:

    When you sue the Raspberry Pi Imager, you must use the option to set a
    user and password


    Last time I used  it, it would let you enter "root" for the username,
    but it wouldn't set the password for root.

    Correct, they specifically stopped that
    --
    Chris
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Lawrence D'Oliveiro@ldo@nz.invalid to comp.sys.raspberry-pi on Mon Jan 27 05:56:48 2025
    From Newsgroup: comp.sys.raspberry-pi

    On Sun, 26 Jan 2025 10:21:02 +0000 (GMT), Bob Latham wrote:

    Before anyone makes the obvious claim, in my eyes a pi doesn't
    qualify as a PC.

    It’s a personal computer. Remember, the original PCs were “personal” because individuals could buy them and set them up for themselves. The Raspberry Pi is, if anything, a further continuation of that trend.

    More than that, it keeps alive some of the original spirit that has gone
    from the Microsoft/Apple market: early PCs were hackable to some extent by users (remember when you got BIOS listings in the Technical Manuals?), but current proprietary machines effectively have a big sign across them
    saying “No User-Serviceable Parts Inside” (and this applies to both hardware and software).

    Conversely, the Linux-running Raspberry Pi invites you to open it up and
    mess around, both in terms of hardware and software. And this is
    deliberate, by design.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Lawrence D'Oliveiro@ldo@nz.invalid to comp.sys.raspberry-pi on Mon Jan 27 06:02:04 2025
    From Newsgroup: comp.sys.raspberry-pi

    On Sun, 26 Jan 2025 09:23:22 +0000, The Natural Philosopher wrote:

    ... openssl passwd -6 -stdin ...

    I would be wary of using this command. It doesn’t seem to support the same password-hashing algorithms as the system crypt(3) call. And it needs to.

    <https://manpages.debian.org/crypt(3)>
    <https://manpages.debian.org/crypt(5)>
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From nospam.Mike.Powell@nospam.Mike.Powell@f1.n770.z21615.fidonet.org (Mike Powell) to LAWRENCE D'OLIVEIRO on Mon Jan 27 09:30:00 2025
    From Newsgroup: comp.sys.raspberry-pi

    More than that, it keeps alive some of the original spirit that has gone
    from the Microsoft/Apple market: early PCs were hackable to some extent by users (remember when you got BIOS listings in the Technical Manuals?), but current proprietary machines effectively have a big sign across them
    saying "No User-Serviceable Parts Inside" (and this applies to both
    hardware and software).

    Conversely, the Linux-running Raspberry Pi invites you to open it up and
    mess around, both in terms of hardware and software. And this is
    deliberate, by design.

    This is some of the reason I have been drawn to sbc computing over the past
    few years. Adding things to them is not quite like the old "open the case
    and slide a new card in" procedure, but the ability to tinker is still certainly there.


    * SLMR 2.1a * If you chose not to decide, you still have made a choice!
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From nospam.Dave.Vandermeer@nospam.Dave.Vandermeer@f275.n229.z1.fidonet.org (Dave Vandermeer) to UUCP on Wed Feb 26 17:49:00 2025
    From Newsgroup: comp.sys.raspberry-pi



    It boots OK and the ssh deamon is running but the default username
    'pi' and password 'raspberry' don't work. How on earth do I get into
    it to start it up?

    Did you use the RPI Imager to create your SD card? You need to create a password for the pi user now. As far as I have seen it does not come with the password of 'raspberry' any more since they upgraded to bookworm ..

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Sun Mar 2 09:51:28 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 26/02/2025 04:49, Dave Vandermeer wrote:


    > It boots OK and the ssh deamon is running but the default username
    > 'pi' and password 'raspberry' don't work. How on earth do I get into
    > it to start it up?

    Did you use the RPI Imager to create your SD card? You need to create a password for the pi user now. As far as I have seen it does not come with the password of 'raspberry' any more since they upgraded to bookworm ..

    I think you can edit the boot partition to set a user up

    "There are also mechanisms to preconfigure an image without using
    Imager. To set up a user on first boot and bypass the wizard completely, create a file called userconf or userconf.txt in the boot partition of
    the SD card; this is the part of the SD card which can be seen when it
    is mounted in a Windows or MacOS computer.

    This file should contain a single line of text, consisting of username:encrypted- password – so your desired username, followed immediately by a colon, followed immediately by an encrypted
    representation of the password you want to use.

    To generate the encrypted password, the easiest way is to use OpenSSL on
    a Raspberry Pi that is already running – open a terminal window and enter

    echo 'mypassword' | openssl passwd -6 -stdin

    This will produce what looks like a string of random characters, which
    is actually an encrypted version of the supplied password."

    https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/

    I think you can also use the values in /etc/shadow on another system to
    clone a user and password.

    But if you have another Linux system, and are using it to burn/modify
    the boot disk image for the pi, this method works extremely well.
    --
    How fortunate for governments that the people they administer don't think.

    Adolf Hitler


    --- Synchronet 3.20c-Linux NewsLink 1.2