Skip to content

Commit

Permalink
v6.26
Browse files Browse the repository at this point in the history
+ DietPi-PREP | Remove additional users, groups and dirs, found on current NanoPi NEO2 image with OMV remains: #2994 (comment)
  • Loading branch information
MichaIng authored Jul 24, 2019
1 parent 7637b82 commit 12e55c9
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions PREP_SYSTEM_FOR_DIETPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ _EOF_
G_DIETPI-NOTIFY 2 '-----------------------------------------------------------------------------------'
#------------------------------------------------------------------------------------------------

G_DIETPI-NOTIFY 2 'Deleting list of known users, not required by DietPi'
G_DIETPI-NOTIFY 2 'Deleting list of known users and groups, not required by DietPi'

getent passwd pi &> /dev/null && userdel -f pi
getent passwd test &> /dev/null && userdel -f test # @fourdee
Expand All @@ -977,6 +977,14 @@ _EOF_
getent passwd linaro &> /dev/null && userdel -f linaro # ASUS TB
getent passwd dietpi &> /dev/null && userdel -f dietpi # recreated below
getent passwd debian &> /dev/null && userdel -f debian # BBB
getent passwd openmediavault-webgui &> /dev/null && userdel -f openmediavault-webgui # OMV (NanoPi NEO2)
getent passwd admin &> /dev/null && userdel -f admin # OMV (NanoPi NEO2)
getent passwd fa &> /dev/null && userdel -f fa # OMV (NanoPi NEO2)
getent passwd colord &> /dev/null && userdel -f colord # OMV (NanoPi NEO2)
getent passwd saned &> /dev/null && userdel -f saned # OMV (NanoPi NEO2)
getent group openmediavault-config &> /dev/null && groupdel openmediavault-config # OMV (NanoPi NEO2)
getent group openmediavault-engined &> /dev/null && groupdel openmediavault-engined # OMV (NanoPi NEO2)
getent group openmediavault-webgui &> /dev/null && groupdel openmediavault-webgui # OMV (NanoPi NEO2)

G_DIETPI-NOTIFY 2 'Removing misc files/folders/services, not required by DietPi'

Expand Down Expand Up @@ -1055,6 +1063,7 @@ _EOF_
[[ -d '/var/log.hdd' ]] && rm -R /var/log.hdd

# - OMV: https://github.com/MichaIng/DietPi/issues/2994
[[ -d '/etc/openmediavault' ]] && rm -R /etc/openmediavault
rm -f /etc/cron.*/openmediavault*
rm -f /usr/sbin/omv-*

Expand Down Expand Up @@ -1088,14 +1097,14 @@ _EOF_
ln -sf /etc/profile.d/bash_completion.sh /etc/bashrc.d/dietpi-bash_completion.sh

#-----------------------------------------------------------------------------------
#Create_DietPi_User
# DietPi user

l_message='Creating DietPi User Account' G_RUN_CMD /DietPi/dietpi/func/dietpi-set_software useradd dietpi

#-----------------------------------------------------------------------------------
#UID bit for sudo: https://github.com/MichaIng/DietPi/issues/794
# UID bit for sudo: https://github.com/MichaIng/DietPi/issues/794

G_DIETPI-NOTIFY 2 'Configuring Sudo UID bit'
G_DIETPI-NOTIFY 2 'Configuring sudo UID bit'

chmod 4755 $(which sudo)

Expand Down

0 comments on commit 12e55c9

Please sign in to comment.