##// END OF EJS Templates
Merge pull request #63 from denismosolov/set-up-user-password...
drtyhlpr -
r115:802cfca78bfb Fusion
parent child
Show More
@@ -61,7 +61,10 Set the desired Debian release name. The script at this time supports the bootst
61 61 Set system host name. It's recommended that the host name is unique in the corresponding subnet.
62 62
63 63 ##### `PASSWORD`="raspberry"
64 Set system `root` password. The same password is used for the created user `pi`. It's **STRONGLY** recommended that you choose a custom password.
64 Set system `root` password. It's **STRONGLY** recommended that you choose a custom password.
65
66 ##### `USER_PASSWORD`="raspberry"
67 Set password for the created non-root user `USER_NAME`=pi. Ignored if `ENABLE_USER`=false. It's **STRONGLY** recommended that you choose a custom password.
65 68
66 69 ##### `DEFLOCAL`="en_US.UTF-8"
67 70 Set default system locale. This setting can also be changed inside the running OS using the `dpkg-reconfigure locales` command. Please note that on using this parameter the script will automatically install the required packages `locales`, `keyboard-configuration` and `console-setup`.
@@ -172,7 +175,7 Install and enable the [hardware accelerated Xorg video driver](https://github.c
172 175 Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service.
173 176
174 177 ##### `ENABLE_USER`=true
175 Create non-root user with password raspberry. Unless overridden with `USER_NAME`=user, username will be `pi`.
178 Create non-root user with password `USER_PASSWORD`=raspberry. Unless overridden with `USER_NAME`=user, username will be `pi`.
176 179
177 180 ##### `USER_NAME`=pi
178 181 Non-root user to create. Ignored if `ENABLE_USER`=false
@@ -7,12 +7,13
7 7
8 8 # Generate crypt(3) password string
9 9 ENCRYPTED_PASSWORD=`mkpasswd -m sha-512 "${PASSWORD}"`
10 ENCRYPTED_USER_PASSWORD=`mkpasswd -m sha-512 "${USER_PASSWORD}"`
10 11
11 12 # Setup default user
12 13 if [ "$ENABLE_USER" = true ] ; then
13 14 chroot_exec adduser --gecos $USER_NAME --add_extra_groups \
14 15 --disabled-password $USER_NAME
15 chroot_exec usermod -a -G sudo -p "${ENCRYPTED_PASSWORD}" $USER_NAME
16 chroot_exec usermod -a -G sudo -p "${ENCRYPTED_USER_PASSWORD}" $USER_NAME
16 17 fi
17 18
18 19 # Setup root password or not
@@ -78,6 +78,7 RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:=""}
78 78 # General settings
79 79 HOSTNAME=${HOSTNAME:=rpi${RPI_MODEL}-${RELEASE}}
80 80 PASSWORD=${PASSWORD:=raspberry}
81 USER_PASSWORD=${USER_PASSWORD:=raspberry}
81 82 DEFLOCAL=${DEFLOCAL:="en_US.UTF-8"}
82 83 TIMEZONE=${TIMEZONE:="Europe/Berlin"}
83 84 EXPANDROOT=${EXPANDROOT:=true}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant