Skip to content

Commit

Permalink
v6.27
Browse files Browse the repository at this point in the history
+ DietPi-Software | Passwords cannot be added as raw test via usermod/useradd -p, hence chpasswd must be used
  • Loading branch information
MichaIng authored Dec 17, 2019
1 parent 61ccd94 commit 1dfa757
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -10226,9 +10226,12 @@ _EOF_

Banner_Configuration

# User
local usercmd='useradd -rMU'
getent passwd qbittorrent &> /dev/null && usercmd='usermod -a'
$usercmd -G dietpi -p "$GLOBAL_PW" -s $(command -v nologin) qbittorrent
$usercmd -G dietpi -s $(command -v nologin) qbittorrent
# - Change password only on fresh install
[[ $usercmd == 'useradd'* ]] && chpasswd <<< "qbittorrent:$GLOBAL_PW"

# Config
mkdir -p /home/qbittorrent/.config/qBittorrent
Expand Down Expand Up @@ -11822,11 +11825,14 @@ _EOF_
Banner_Configuration

# Create allo user for GUI
local usercmd='useradd -MU'
local usercmd='useradd -rMU'
getent passwd allo &> /dev/null && usercmd='usermod -a'
$usercmd -G www-data -p 'allo' -s /bin/bash allo
$usercmd -G www-data -s /bin/bash allo
# - Set password only on fresh install
[[ $usercmd == 'useradd'* ]] && chpasswd <<< 'allo:allo'
# - Create home dir separately to avoid skeleton creation
mkdir -p /home/allo
chown -R allo:allo /home/allo
# - Grant sudo permissions
echo 'allo ALL=NOPASSWD: ALL' > /etc/sudoers.d/allo

Expand All @@ -11853,7 +11859,7 @@ _EOF_

# Permissions
chown -R www-data:www-data /var/www/allo
chmod 770 -R /var/www/allo
chmod -R 770 /var/www/allo

# HW specific changes
# - SPARKY ONLY - Auto detect eth adapter
Expand Down

0 comments on commit 1dfa757

Please sign in to comment.