I would recommend a more strict check than proposed; rather than "if the directory-to-be-removed matches one of several hardcoded regex's", I would prefer to see: "If it doesn't look like a manually added user": if ($usershome !~ ^$DHOME && $force!=true) { // Warn, exit, whatever } Where DHOME is easily parsed from adduser.conf. Justin