Skip to content

shadow root password change not quite correct ?  #21

Description

@rwestgeest

Hey,
I was looking through your bash script. Nice work. I wondered though if line 408 works the way you expect:

sed -e "s#^root:[^:]\+:#root:${root_password_hash}:#" "${sdcard_mount_p2}/etc/shadow" -e  "s#^pi:[^:]\+:#pi:${pi_password_hash}:#" -i "${sdcard_mount_p2}/etc/shadow"

it contains a -i to interactively edit /etc/shadow at the end but /etc/shadow is also elsewhere on the line. Isn't that superfluous?

I tried both with and without, both seemed to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions