create home folders as 0755 on Debian 12 (#4156)

related: https://github.com/raspiblitz/raspiblitz/issues/4154
This commit is contained in:
openoms 2023-09-09 21:36:35 +03:00 committed by GitHub
parent e670e61297
commit 39102b149c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 37 additions and 37 deletions

View File

@ -392,7 +392,7 @@ echo -e "\n*** PREPARE ${baseimage} ***"
# make sure the pi user is present # make sure the pi user is present
if [ "$(compgen -u | grep -c pi)" -eq 0 ];then if [ "$(compgen -u | grep -c pi)" -eq 0 ];then
echo "# Adding the user pi" echo "# Adding the user pi"
adduser --disabled-password --gecos "" pi adduser --system --group --home /home/pi pi
adduser pi sudo adduser pi sudo
fi fi
@ -535,7 +535,7 @@ service rsyslog restart
echo -e "\n*** ADDING MAIN USER admin ***" echo -e "\n*** ADDING MAIN USER admin ***"
# based on https://raspibolt.org/system-configuration.html#add-users # based on https://raspibolt.org/system-configuration.html#add-users
# using the default password 'raspiblitz' # using the default password 'raspiblitz'
adduser --disabled-password --gecos "" admin adduser --system --group --home /home/admin admin
echo "admin:raspiblitz" | chpasswd echo "admin:raspiblitz" | chpasswd
adduser admin sudo adduser admin sudo
chsh admin -s /bin/bash chsh admin -s /bin/bash
@ -553,7 +553,7 @@ fi
echo -e "\n*** ADDING SERVICE USER bitcoin" echo -e "\n*** ADDING SERVICE USER bitcoin"
# based on https://raspibolt.org/guide/raspberry-pi/system-configuration.html # based on https://raspibolt.org/guide/raspberry-pi/system-configuration.html
# create user and set default password for user # create user and set default password for user
adduser --disabled-password --gecos "" bitcoin adduser --system --group --home /home/bitcoin bitcoin
echo "bitcoin:raspiblitz" | chpasswd echo "bitcoin:raspiblitz" | chpasswd
# make home directory readable # make home directory readable
chmod 755 /home/bitcoin chmod 755 /home/bitcoin

View File

@ -237,7 +237,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
rm -r /home/blitzapi/blitz_api 2>/dev/null rm -r /home/blitzapi/blitz_api 2>/dev/null
# create user # create user
adduser --disabled-password --gecos "" blitzapi adduser --system --group --home /home/blitzapi blitzapi
# sudo capability for manipulating passwords # sudo capability for manipulating passwords
/usr/sbin/usermod --append --groups sudo blitzapi /usr/sbin/usermod --append --groups sudo blitzapi

View File

@ -36,7 +36,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "" echo ""
# create user # create user
sudo adduser --disabled-password --gecos "" bitcoinminds 2>/dev/null sudo adduser --system --group --home /home/bitcoinminds bitcoinminds
# add local directory to path and set PATH for the user # add local directory to path and set PATH for the user
sudo bash -c "echo 'PATH=\$PATH:/home/bitcoinminds/.local/bin' >> /home/bitcoinminds/.profile" sudo bash -c "echo 'PATH=\$PATH:/home/bitcoinminds/.local/bin' >> /home/bitcoinminds/.profile"

View File

@ -194,7 +194,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on
# create bos user # create bos user
sudo adduser --disabled-password --gecos "" bos sudo adduser --system --group --home /home/bos bos
echo "# Create data folder on the disk" echo "# Create data folder on the disk"
# move old data if present # move old data if present

View File

@ -207,7 +207,7 @@ if [ "$1" = "install" ]; then
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on
# add btcrpcexplorer user # add btcrpcexplorer user
sudo adduser --disabled-password --gecos "" btcrpcexplorer sudo adduser --system --group --home /home/btcrpcexplorer btcrpcexplorer
# install btc-rpc-explorer # install btc-rpc-explorer
cd /home/btcrpcexplorer cd /home/btcrpcexplorer

View File

@ -346,7 +346,7 @@ if [ "$1" = "install" ]; then
fi fi
echo "# create btcpay user" echo "# create btcpay user"
sudo adduser --disabled-password --gecos "" btcpay sudo adduser --system --group --home /home/btcpay btcpay
cd /home/btcpay || exit 1 cd /home/btcpay || exit 1
echo "# install .NET" echo "# install .NET"

View File

@ -77,7 +77,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# get Go vars # get Go vars
source /etc/profile source /etc/profile
# create dedicated user # create dedicated user
sudo adduser --disabled-password --gecos "" circuitbreaker sudo adduser --system --group --home /home/circuitbreaker circuitbreaker
# set PATH for the user # set PATH for the user
sudo bash -c "echo 'PATH=\$PATH:/home/circuitbreaker/go/bin/' >> /home/circuitbreaker/.profile" sudo bash -c "echo 'PATH=\$PATH:/home/circuitbreaker/go/bin/' >> /home/circuitbreaker/.profile"

View File

@ -99,7 +99,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo apt install -y virtualenv python-dev libusb-1.0-0-dev libudev-dev sudo apt install -y virtualenv python-dev libusb-1.0-0-dev libudev-dev
# create dedicated user # create dedicated user
sudo adduser --disabled-password --gecos "" ckbunker sudo adduser --system --group --home /home/ckbunker ckbunker
# add the user to the Tor group # add the user to the Tor group
sudo usermod -a -G debian-tor ckbunker sudo usermod -a -G debian-tor ckbunker

View File

@ -274,7 +274,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo echo
echo "# Creating the electrs user" echo "# Creating the electrs user"
echo echo
sudo adduser --disabled-password --gecos "" electrs sudo adduser --system --group --home /home/electrs electrs
cd /home/electrs cd /home/electrs
echo echo

View File

@ -157,7 +157,7 @@ if [ "${mode}" = "on" ] || [ "${mode}" = "1" ]; then
# create dedicated user # create dedicated user
echo "# Add the 'faraday' user" echo "# Add the 'faraday' user"
sudo adduser --disabled-password --gecos "" faraday sudo adduser --system --group --home /home/faraday faraday
# set PATH for the user # set PATH for the user
sudo bash -c "echo 'PATH=\$PATH:/home/faraday/bin/' >> /home/faraday/.profile" sudo bash -c "echo 'PATH=\$PATH:/home/faraday/bin/' >> /home/faraday/.profile"

View File

@ -196,7 +196,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# create a dedicated user for the app # create a dedicated user for the app
echo "# create user" echo "# create user"
sudo adduser --disabled-password --gecos "" ${APPID} || exit 1 sudo adduser --system --group --home /home/${APPID} ${APPID} || exit 1
# add user to special groups with special access rights # add user to special groups with special access rights
# echo "# add use to special groups" # echo "# add use to special groups"

View File

@ -30,7 +30,7 @@ if [ "$1" = on ]; then
fi fi
# create a dedicated user # create a dedicated user
sudo adduser --disabled-password --gecos "" fulcrum sudo adduser --system --group --home /home/fulcrum fulcrum
cd /home/fulcrum || exit 1 cd /home/fulcrum || exit 1
sudo apt install -y libssl-dev # was needed on Debian Bullseye sudo apt install -y libssl-dev # was needed on Debian Bullseye

View File

@ -86,7 +86,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
############### ###############
# create helipad user: # create helipad user:
sudo adduser --disabled-password --gecos "" $HELIPAD_USER sudo adduser --system --group --home /home/$HELIPAD_USER $HELIPAD_USER
# install system dependencies: # install system dependencies:
sudo apt --assume-yes update sudo apt --assume-yes update

View File

@ -128,7 +128,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
if [ ${isInstalled} -eq 0 ]; then if [ ${isInstalled} -eq 0 ]; then
# add homer user # add homer user
sudo adduser --disabled-password --gecos "" homer sudo adduser --system --group --home /home/homer homer
# install homer # install homer
cd /home/homer cd /home/homer

View File

@ -261,7 +261,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# BACKGROUND is here to seperate running apps by unix users # BACKGROUND is here to seperate running apps by unix users
# and only give file write access to the rest of the system where needed. # and only give file write access to the rest of the system where needed.
echo "# Create user" echo "# Create user"
sudo adduser --disabled-password --gecos "" ${APPID} sudo adduser --system --group --home /home/${APPID} ${APPID}
# create a data directory on /mnt/hdd/app-data/ for the app # create a data directory on /mnt/hdd/app-data/ for the app
# BACKGROUND is that any critical data that needs to survive an update should # BACKGROUND is that any critical data that needs to survive an update should

View File

@ -99,7 +99,7 @@ if [ "$1" = "install" ]; then
echo "# *** INSTALL JAM (user & code) ***" echo "# *** INSTALL JAM (user & code) ***"
echo "# Creating the ${USERNAME} user" echo "# Creating the ${USERNAME} user"
sudo adduser --disabled-password --gecos "" ${USERNAME} sudo adduser --system --group --home /home/${USERNAME} ${USERNAME}
# install nodeJS # install nodeJS
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on

View File

@ -57,7 +57,7 @@ if [ "$1" = "install" ]; then
sudo userdel -rf joinmarket 2>/dev/null sudo userdel -rf joinmarket 2>/dev/null
echo "# add the 'joinmarket' user" echo "# add the 'joinmarket' user"
adduser --disabled-password --gecos "" joinmarket adduser --system --group --home /home/joinmarket joinmarket
# add to sudo group (required for installation) # add to sudo group (required for installation)
adduser joinmarket sudo || exit 1 adduser joinmarket sudo || exit 1

View File

@ -37,7 +37,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on
# add user # add user
sudo adduser --disabled-password --gecos "" $USERNAME sudo adduser --system --group --home /home/$USERNAME $USERNAME
# install kindle-display # install kindle-display
echo "# install .." echo "# install .."

View File

@ -52,7 +52,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
source /etc/profile source /etc/profile
# create dedicated user # create dedicated user
sudo adduser --disabled-password --gecos "" lightningtipbot sudo adduser --system --group --home /home/lightningtipbot lightningtipbot
# install from source # install from source
cd /home/lightningtipbot cd /home/lightningtipbot

View File

@ -90,7 +90,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
if [ ${isInstalled} -eq 0 ]; then if [ ${isInstalled} -eq 0 ]; then
# create dedicated user # create dedicated user
sudo adduser --disabled-password --gecos "" lit sudo adduser --system --group --home /home/lit lit
# make sure symlink to central app-data directory exists # make sure symlink to central app-data directory exists
sudo rm -rf /home/lit/.lnd # not a symlink.. delete it silently sudo rm -rf /home/lit/.lnd # not a symlink.. delete it silently
# create symlink # create symlink

View File

@ -621,7 +621,7 @@ if [ "$1" = "install" ]; then
# add lnbits user # add lnbits user
echo "*** Add the 'lnbits' user ***" echo "*** Add the 'lnbits' user ***"
sudo adduser --disabled-password --gecos "" lnbits sudo adduser --system --group --home /home/lnbits lnbits
# get optional github parameter # get optional github parameter
githubUser="lnbits" githubUser="lnbits"

View File

@ -129,7 +129,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
############### ###############
# create lndg user # create lndg user
sudo adduser --disabled-password --gecos "" lndg sudo adduser --system --group --home /home/lndg lndg
# add user to group with admin access to lnd # add user to group with admin access to lnd
sudo /usr/sbin/usermod --append --groups lndadmin lndg sudo /usr/sbin/usermod --append --groups lndadmin lndg
# make sure symlink to central app-data directory exists # make sure symlink to central app-data directory exists

View File

@ -54,7 +54,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/bonus.go.sh on /home/admin/config.scripts/bonus.go.sh on
# create lnproxy user # create lnproxy user
sudo adduser --disabled-password --gecos "" lnproxy sudo adduser --system --group --home /home/lnproxy lnproxy
# create macaroon # create macaroon
cd /home/bitcoin || exit 1 cd /home/bitcoin || exit 1

View File

@ -53,7 +53,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
source /etc/profile source /etc/profile
# create dedicated user # create dedicated user
sudo adduser --disabled-password --gecos "" loop sudo adduser --system --group --home /home/loop loop
# set PATH for the user # set PATH for the user
sudo bash -c "echo 'PATH=\$PATH:/home/loop/go/bin/' >> /home/loop/.profile" sudo bash -c "echo 'PATH=\$PATH:/home/loop/go/bin/' >> /home/loop/.profile"

View File

@ -132,7 +132,7 @@ if [ "$1" = "install" ]; then
sudo apt-get install -y mariadb-server mariadb-client sudo apt-get install -y mariadb-server mariadb-client
# add mempool user # add mempool user
sudo adduser --disabled-password --gecos "" mempool sudo adduser --system --group --home /home/mempool mempool
# install mempool # install mempool
cd /home/mempool cd /home/mempool

View File

@ -40,7 +40,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
if [ ${isInstalled} -eq 0 ]; then if [ ${isInstalled} -eq 0 ]; then
# create dedicated user # create dedicated user
sudo adduser --disabled-password --gecos "" pool sudo adduser --system --group --home /home/pool pool
echo "# persist settings in app-data" echo "# persist settings in app-data"
echo "# make sure the data directory exists" echo "# make sure the data directory exists"

View File

@ -29,7 +29,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "*** INSTALL pyblocks***" echo "*** INSTALL pyblocks***"
# create pyblock user # create pyblock user
sudo adduser --disabled-password --gecos "" pyblock sudo adduser --system --group --home /home/pyblock pyblock
cd /home/pyblock cd /home/pyblock
sudo -u pyblock mkdir /home/pyblock/config sudo -u pyblock mkdir /home/pyblock/config

View File

@ -136,7 +136,7 @@ if [ "$1" = "install" ]; then
# create rtl user (one for all instances) # create rtl user (one for all instances)
if [ $(compgen -u | grep -c rtl) -eq 0 ]; then if [ $(compgen -u | grep -c rtl) -eq 0 ]; then
sudo adduser --disabled-password --gecos "" rtl || exit 1 sudo adduser --system --group --home /home/rtl rtl || exit 1
fi fi
# download source code and set to tag release # download source code and set to tag release

View File

@ -213,7 +213,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo apt update sudo apt update
sudo apt-get install -y virtualenv libffi-dev libusb-1.0.0-dev libudev-dev sudo apt-get install -y virtualenv libffi-dev libusb-1.0.0-dev libudev-dev
sudo adduser --disabled-password --gecos "" specter sudo adduser --system --group --home /home/specter specter
if [ "$(ls /home | grep -c "specter")" == "0" ]; then if [ "$(ls /home | grep -c "specter")" == "0" ]; then
echo "error='was not able to create user specter'" echo "error='was not able to create user specter'"
exit 1 exit 1

View File

@ -387,7 +387,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/lnd.keysend.sh on /home/admin/config.scripts/lnd.keysend.sh on
echo "*** Add the 'sphinxrelay' user ***" echo "*** Add the 'sphinxrelay' user ***"
sudo adduser --disabled-password --gecos "" sphinxrelay sudo adduser --system --group --home /home/sphinxrelay sphinxrelay
sudo /usr/sbin/usermod --append --groups lndadmin sphinxrelay sudo /usr/sbin/usermod --append --groups lndadmin sphinxrelay
sudo /usr/sbin/usermod --append --groups lndsigner sphinxrelay sudo /usr/sbin/usermod --append --groups lndsigner sphinxrelay
sudo /usr/sbin/usermod --append --groups lndrouter sphinxrelay sudo /usr/sbin/usermod --append --groups lndrouter sphinxrelay

View File

@ -110,7 +110,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
if [ ${isInstalled} -eq 0 ]; then if [ ${isInstalled} -eq 0 ]; then
echo "*** Add the 'squeaknode' user ***" echo "*** Add the 'squeaknode' user ***"
sudo adduser --disabled-password --gecos "" squeaknode sudo adduser --system --group --home /home/squeaknode squeaknode
# make sure needed debian packages are installed # make sure needed debian packages are installed
echo "# installing needed packages" echo "# installing needed packages"

View File

@ -28,7 +28,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on
# add user # add user
sudo adduser --disabled-password --gecos "" $USERNAME sudo adduser --system --group --home /home/$USERNAME $USERNAME
# install stacking-sats-kraken # install stacking-sats-kraken
cd $HOME_DIR cd $HOME_DIR

View File

@ -63,7 +63,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on
# add user # add user
sudo adduser --disabled-password --gecos "" $USERNAME sudo adduser --system --group --home /home/$USERNAME $USERNAME
# install tallycoin_connect # install tallycoin_connect
cd $HOME_DIR cd $HOME_DIR

View File

@ -161,7 +161,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# BACKGROUND is here to seperate running apps by unix users # BACKGROUND is here to seperate running apps by unix users
# and only give file write access to the rest of the system where needed. # and only give file write access to the rest of the system where needed.
echo "# create user" echo "# create user"
sudo adduser --disabled-password --gecos "" ${APPID} || exit 1 sudo adduser --system --group --home /home/${APPID} ${APPID} || exit 1
# add user to special groups with special access rights # add user to special groups with special access rights
# BACKGROUND there are some unix groups available that will give the access to # BACKGROUND there are some unix groups available that will give the access to

View File

@ -96,7 +96,7 @@ if [ "$1" = "install" ]; then
/home/admin/config.scripts/bonus.nodejs.sh on /home/admin/config.scripts/bonus.nodejs.sh on
# create thunderhub user # create thunderhub user
sudo adduser --disabled-password --gecos "" thunderhub sudo adduser --system --group --home /home/thunderhub thunderhub
# download and install # download and install
sudo -u thunderhub git clone https://github.com/apotdevin/thunderhub.git /home/thunderhub/thunderhub sudo -u thunderhub git clone https://github.com/apotdevin/thunderhub.git /home/thunderhub/thunderhub