diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:22:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:22:07 +0000 |
commit | a982d958e3c5acba737f166177934ecdf8ebdf45 (patch) | |
tree | a4acc11aacd2865464d800eb8d8557db8df9d99f /debian/passwd.postinst | |
parent | Adding upstream version 1:4.5. (diff) | |
download | shadow-a982d958e3c5acba737f166177934ecdf8ebdf45.tar.xz shadow-a982d958e3c5acba737f166177934ecdf8ebdf45.zip |
Adding debian version 1:4.5-1.1.debian/1%4.5-1.1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/passwd.postinst')
-rw-r--r-- | debian/passwd.postinst | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/passwd.postinst b/debian/passwd.postinst new file mode 100644 index 0000000..691733e --- /dev/null +++ b/debian/passwd.postinst @@ -0,0 +1,44 @@ +#!/bin/sh + +set -e + +case "$1" in +configure) + # Fix permissions on various log files from old versions of the debian + # installer, some unrelated to passwd but we decided to put the fix + # here since there was no better place. This can safely be removed + # after etch is released. + if dpkg --compare-versions "$2" lt "1:4.0.14-9"; then + for log in /var/log/base-config* \ + $(find /var/log/debian-installer/ /var/log/installer/ -type f 2>/dev/null ); do + if [ -e "$log" ]; then + chmod 600 "$log" + fi + done + fi + + rm -f /etc/pam.d/passwd.pre-upgrade 2>/dev/null + if ! getent group shadow | grep -q '^shadow:[^:]*:42' + then + groupadd -g 42 shadow || ( + cat <<EOF +Group ID 42 has been allocated for the shadow group. You have either +used 42 yourself or created a shadow group with a different ID. +Please correct this problem and reconfigure with ``dpkg --configure passwd''. + +Note that both user and group IDs in the range 0-99 are globally +allocated by the Debian project and must be the same on every Debian +system. +EOF + exit 1 + ) + fi + ;; +esac + +# Run shadowconfig only on new installs +[ -z "$2" ] && shadowconfig on + +#DEBHELPER# + +exit 0 |