summaryrefslogtreecommitdiff
path: root/localrmaccount
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-04-17 12:03:18 +0200
committerJonas Smedegaard <dr@jones.dk>2014-04-17 12:03:18 +0200
commit1e40c8ee8b6d7f4054f268be677de61ed16584e6 (patch)
tree10d5f553da81748253b70dc563f696c37a31ab50 /localrmaccount
parentba67fc64eb7a77fd15fcb5b63c39e46192ada1ed (diff)
Separate localrmaccount from localrmstaleaccounts.
Diffstat (limited to 'localrmaccount')
-rwxr-xr-xlocalrmaccount9
1 files changed, 9 insertions, 0 deletions
diff --git a/localrmaccount b/localrmaccount
new file mode 100755
index 0000000..8424acd
--- /dev/null
+++ b/localrmaccount
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+u="$1"; shift
+p=/var/backups/users-dropped/
+getent passwd "$u" > "$p/$u.getent"
+getent group "$u" >> "$p/$u.getent"
+deluser --remove-home --backup --backup-to "$p" "$u"