summaryrefslogtreecommitdiff
path: root/localrmaccount
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2021-09-28 16:27:15 +0200
committerJonas Smedegaard <dr@jones.dk>2021-09-28 16:27:15 +0200
commit3d6dabbf2dbf0d145b101e2eb8d6fac53246caf5 (patch)
tree0135e93806dfa1e06fe346eae2bd41ddfec25e37 /localrmaccount
parent598d5307bbe5cf20f45780cd8ef1fb40c9694fe9 (diff)
be verbose about actual removals
Diffstat (limited to 'localrmaccount')
-rwxr-xr-xlocalrmaccount1
1 files changed, 1 insertions, 0 deletions
diff --git a/localrmaccount b/localrmaccount
index 8424acd..f77167a 100755
--- a/localrmaccount
+++ b/localrmaccount
@@ -6,4 +6,5 @@ u="$1"; shift
p=/var/backups/users-dropped/
getent passwd "$u" > "$p/$u.getent"
getent group "$u" >> "$p/$u.getent"
+[ -z "$2" ] || echo "$2" >> "$p/$u.getent"
deluser --remove-home --backup --backup-to "$p" "$u"