@@ -144,7 +144,10 Install and enable the hardware accelerated Xorg video driver `fbturbo`. Please | |||||
144 | Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service. |
|
144 | Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service. | |
145 |
|
145 | |||
146 | ##### `ENABLE_USER`=true |
|
146 | ##### `ENABLE_USER`=true | |
147 | Create pi user with password raspberry |
|
147 | Create non-root user with password raspberry. Unless overridden with `USER_NAME`=user, username will be `pi`. | |
|
148 | ||||
|
149 | ##### `USER_NAME`=pi | |||
|
150 | Non-root user to create. Ignored if `ENABLE_USER`=false | |||
148 |
|
151 | |||
149 | ##### `ENABLE_ROOT`=true |
|
152 | ##### `ENABLE_ROOT`=true | |
150 | Set root user password so root login will be enabled |
|
153 | Set root user password so root login will be enabled |
@@ -10,8 +10,9 ENCRYPTED_PASSWORD=`mkpasswd -m sha-512 "${PASSWORD}"` | |||||
10 |
|
10 | |||
11 | # Setup default user |
|
11 | # Setup default user | |
12 | if [ "$ENABLE_USER" = true ] ; then |
|
12 | if [ "$ENABLE_USER" = true ] ; then | |
13 |
chroot_exec adduser --gecos |
|
13 | chroot_exec adduser --gecos $USER_NAME --add_extra_groups \ | |
14 | chroot_exec usermod -a -G sudo -p "${ENCRYPTED_PASSWORD}" pi |
|
14 | --disabled-password $USER_NAME | |
|
15 | chroot_exec usermod -a -G sudo -p "${ENCRYPTED_PASSWORD}" $USER_NAME | |||
15 | fi |
|
16 | fi | |
16 |
|
17 | |||
17 | # Setup root password or not |
|
18 | # Setup root password or not |
@@ -101,6 +101,7 ENABLE_XORG=${ENABLE_XORG:=false} | |||||
101 | ENABLE_WM=${ENABLE_WM:=""} |
|
101 | ENABLE_WM=${ENABLE_WM:=""} | |
102 | ENABLE_RSYSLOG=${ENABLE_RSYSLOG:=true} |
|
102 | ENABLE_RSYSLOG=${ENABLE_RSYSLOG:=true} | |
103 | ENABLE_USER=${ENABLE_USER:=true} |
|
103 | ENABLE_USER=${ENABLE_USER:=true} | |
|
104 | USER_NAME=${USER_NAME:="pi"} | |||
104 | ENABLE_ROOT=${ENABLE_ROOT:=false} |
|
105 | ENABLE_ROOT=${ENABLE_ROOT:=false} | |
105 | ENABLE_ROOT_SSH=${ENABLE_ROOT_SSH:=false} |
|
106 | ENABLE_ROOT_SSH=${ENABLE_ROOT_SSH:=false} | |
106 |
|
107 |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant