Project

General

Profile

Actions

User story #3752

closed

User Management: add an option to remove user home directory when deleting user account

Added by Dennis Cabooter over 11 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
3
Assignee:
-
Category:
Techniques
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

I've created a new feature in the userManagement technique. The feature makes it possible to pass the "-r" option to userdel and it works. However, I can't get the reporting right.

diff -Nru systemSettings/userManagement/userManagement/2.0/metadata.xml systemSettings/userManagement/userManagement/2.1/metadata.xml
--- systemSettings/userManagement/userManagement/2.0/metadata.xml       2013-06-11 16:09:35.000000000 +0200
+++ systemSettings/userManagement/userManagement/2.1/metadata.xml       2013-07-17 10:25:35.000000000 +0200
@@ -70,6 +70,10 @@
           <VALUE>remove</VALUE>
         </ITEM>
         <ITEM>
+          <LABEL>Remove and delete home dir</LABEL>
+          <VALUE>removehome</VALUE>
+        </ITEM>
+        <ITEM>
           <LABEL>Check only (account should exist)</LABEL>
           <VALUE>checkhere</VALUE>
         </ITEM>
diff -Nru systemSettings/userManagement/userManagement/2.0/userManagement.st systemSettings/userManagement/userManagement/2.1/userManagement.st
--- systemSettings/userManagement/userManagement/2.0/userManagement.st  2013-07-17 09:53:30.000000000 +0200
+++ systemSettings/userManagement/userManagement/2.1/userManagement.st  2013-07-17 13:21:08.000000000 +0200
@@ -91,6 +91,8 @@

       "usermanagement_user_remove_${usergroup_user_index}" expression => strcmp("${usergroup_user_action[${usergroup_user_index}]}","remove");

+      "usermanagement_user_removehome_${usergroup_user_index}" expression => strcmp("${usergroup_user_action[${usergroup_user_index}]}","removehome");
+
       "usermanagement_user_checkpres_${usergroup_user_index}" expression => strcmp("${usergroup_user_action[${usergroup_user_index}]}","checkhere");

       "usermanagement_user_checkabs_${usergroup_user_index}" expression => strcmp("${usergroup_user_action[${usergroup_user_index}]}","checknothere");
@@ -157,6 +159,12 @@
         comment => "Delete the user ${usergroup_user_login[${usergroup_user_index}]}",
         ifvarclass => "usermanagement_user_exists_${usergroup_user_index}.usermanagement_user_remove_${usergroup_user_index}";

+      "/usr/sbin/userdel" 
+        args => "-r ${usergroup_user_login[${usergroup_user_index}]}",
+        classes => cf2_if_else("usermanagement_login_remove_${usergroup_user_index}_repaired", "usermanagement_login_remove_${usergroup_user_index}_error"),
+        comment => "Delete the user ${usergroup_user_login[${usergroup_user_index}]}",
+        ifvarclass => "usermanagement_user_exists_${usergroup_user_index}.usermanagement_user_removehome_${usergroup_user_index}";
+
   files:

       "/etc/passwd"

Related issues 2 (0 open2 closed)

Has duplicate Rudder - User story #1938: User Management: add an option to remove user home directory when deleting user accountRejected2011-10-13Actions
Has duplicate Rudder - User story #3971: Add an option to remove home folder when deleting a user with userManagement techniqueRejectedActions
Actions

Also available in: Atom PDF