summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/uci-defaults/migrate-shadow
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/etc/uci-defaults/migrate-shadow')
-rw-r--r--package/base-files/files/etc/uci-defaults/migrate-shadow12
1 files changed, 0 insertions, 12 deletions
diff --git a/package/base-files/files/etc/uci-defaults/migrate-shadow b/package/base-files/files/etc/uci-defaults/migrate-shadow
deleted file mode 100644
index b7ea5718c..000000000
--- a/package/base-files/files/etc/uci-defaults/migrate-shadow
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-local ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)"
-local spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)"
-
-if [ -n "${ppwd#[\!x]}" ] && [ -z "${spwd#[\!x]}" ]; then
- logger -t migrate-shadow "Moving root password hash into shadow database"
- sed -i -e "s:^root\:[^\:]*\::root\:x\::" /etc/passwd
- sed -i -e "s:^root\:[^\:]*\::root\:$ppwd\::" /etc/shadow
-fi
-
-exit 0