summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-05-18 10:48:13 +0200
committerJonas Smedegaard <dr@jones.dk>2023-05-18 10:48:13 +0200
commit51eb4b5f643ac1d8ee7a2ab300a792827d53a287 (patch)
tree91afea0ecb363d07d43e10522f25d3069a40ceac
parent5fe3d1cb0a0ac861c7226a1a4230bc24230d1cd4 (diff)
fix store optional account removal reason
-rwxr-xr-xlocalrmaccount2
1 files changed, 1 insertions, 1 deletions
diff --git a/localrmaccount b/localrmaccount
index f77167a..ac0abf8 100755
--- a/localrmaccount
+++ b/localrmaccount
@@ -6,5 +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"
+[ -z "$1" ] || echo "$1" >> "$p/$u.getent"
deluser --remove-home --backup --backup-to "$p" "$u"