Index: lib/octofuss/users/__init__.py
===================================================================
--- lib/octofuss/users/__init__.py	(revision 55cb0ff5ef9e50710d53e198ead3d291ac2f1ba2)
+++ lib/octofuss/users/__init__.py	(revision a0262d65402e841ba795780fac249f10bda80490)
@@ -1876,25 +1876,53 @@
                 #Remove home directory and save it /var/backups
                 #Create backup
-                # FIXME!!! the user home directory is a user attribute! 
-                home = "/home"
-                dir = os.path.join(home,username)
-                backup = "/var/backups"
-                fileBackup = os.path.join(backup,username)
-                try:
-                        now = datetime.datetime.now()
-                        stringTime = now.strftime("%Y%m%d%h%m%S")
-                        r = os.system("tar cvzf "+fileBackup+"_"+stringTime+".tar.gz "+ dir)
-                        if r == 0:
-                            try:
-                                    r = os.system("rm -rf "+dir) 
-                            except:
-                                    print "Problems removing "+username+"'s home directory!"
-                                    return
-                except:
-                        print "Problems saving "+username+"'s home directory!"
-
-                
-
-
+                home = userObj.getHome().getValue()
+                
+                if home and home.startswith("/home/"):
+                        try:
+                                now = datetime.datetime.now()
+                                stringTime = now.strftime("%Y%m%d%h%m%S")
+                                #Security check
+                                # Do all action only if /home direcotry starts with /home
+                                if home.endswith("/"):
+                                        fileBackup = home[0:-1] + "-" + stringTime + ".bck"
+                                else:
+                                        fileBackup = home + "-" + stringTime + ".bck"
+                                print fileBackup 
+                                compress = self.dialogYesNo("Home backup in process\nDo you want to compress the backup and remove home directory?")
+                                if compress == -8:
+                                        #Compress
+                                        fileBackup = fileBackup+".tar.gz" 
+                                        r = os.system("tar cvzf "+fileBackup+" "+home) 
+                                        #Remove original
+                                        if r == 0:
+                                                r = os.system("rm -rf "+home)    
+                                                if r != 0:
+                                                        raise Exception("Could not delete home directory after compression.")
+
+                                        else:
+                                                raise Exception("Could not compress and delete home directory!\nTry without compress it.")
+                                elif compress == -9:
+                                        #Rename
+                                        r = os.rename(home,fileBackup)
+                                if r != 0 and r != None:
+                                        raise Exception
+                                else:
+                                        showDialog("Backup done: "+fileBackup, gtk.MESSAGE_INFO)
+                        except Exception,e:
+                                print e
+                                showDialog("Problems doing backup of "+username+"'s home directory!",gtk.MESSAGE_ERROR)
+                else:
+                        print "Home doesn't exist"
+
+                
+
+
+        def dialogYesNo(self, message):
+                dialog = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO, gtk.BUTTONS_YES_NO,message )
+                dialog.show()
+                # Close dialog on user response
+                resp = dialog.run()
+                dialog.destroy()
+                return resp
 
         
