diff options
Diffstat (limited to 'localrmaccount')
-rwxr-xr-x | localrmaccount | 9 |
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" |