Skip to content
This repository was archived by the owner on Sep 27, 2020. It is now read-only.
This repository was archived by the owner on Sep 27, 2020. It is now read-only.

secure recalbox-manager #63

@nadenislamarre

Description

@nadenislamarre

Starting with recalbox 4.1, recalbox.conf has a variable : system.security.enabled
if this is one, the recalbox manager (among others) must not be open.

It must be secured.

  1. at minimum by a basic http password
  2. if possible, via ssl while the aim is to secure from network attacks

the login is what you want, but the password to use is the one provided by /etc/init.d/S35rootpasswd
it's in this starting script that you must generate a password file in the temporary location.

I don't manage to do it by myself.
I don't known django and i don't see in recalbox the same configuration files that i found in django documentation (like httpd.conf for example).

The current script content is :


# /etc/shadow is dynamically generated from the password found in /boot/recalbox-boot.conf
# the password is visible only in the es interface
# or to people having already a ssh password via the command : /recalbox/scripts/recalbox-config.sh setRootPassword xyz
MASTERPASSWD=$(/recalbox/scripts/recalbox-config.sh getRootPassword)
if test -z "${MASTERPASSWD}"
then
    # generate a new one
    # hum, in case of error, what to do ? nothing.
    /recalbox/scripts/recalbox-config.sh setRootPassword
    MASTERPASSWD=$(/recalbox/scripts/recalbox-config.sh getRootPassword)
fi

# secure ssh
# write the /etc/shadow file
SHADOWPASSWD=$(openssl passwd -1 "${MASTERPASSWD}")
echo "root:${SHADOWPASSWD}:::::::" > /run/recalbox.shadow

# secure samba
mkdir -p "/var/lib/samba/private"
(echo "${MASTERPASSWD}"; echo "${MASTERPASSWD}") | smbpasswd -a root

# 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions