How to delete a user & its home folder safely?

Deepen

I just created a new user & its home folder & need to delete it now & also I cant find my old user's Downloads,Documents,Pictures,etc folder in /home/olduser & also .Xauthority file. Dont know how it deleted. I executed startx command by pressing Alt+Ctrl+F3when new user wasnt able to log in.

I deleted user from Users & Groups but its home folder didnt get deleted. How can I fix this?

  • How can I delete new user's home folder safely?

  • How can restore my old documents,downloads,folder?

  • If not then how can I create brand new /home folder & link with OS?

nux

to list all users :

cut -d: -f1 /etc/passwd

To remove user :

sudo userdel username

To remove home directory :

sudo rm -r /home/username

To add a home directory to an existing user :

create a home directory

chown this directory for the user

sudo usermod -d /home/directory user

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How could I safely delete the Desktop folder icon from my Home folder?

From Dev

How to safely delete the contents of a folder with a bash script?

From Dev

Shortcut to User Home Folder

From Dev

delete a folder and its content

From Dev

How to safely copy home folder from a 10.04 desktop to a new ubuntu 12.04 installation on a notebook?

From Dev

How to safely copy home folder from a 10.04 desktop to a new ubuntu 12.04 installation on a notebook?

From Dev

How to rename a user safely?

From Dev

How can I remove the home folder for a deleted user on windows 7?

From Dev

How to give user access to specific folder in home directory

From Dev

Linux - How to give full access to home folder and files to a user?

From Dev

how to create a ~/bin folder in all user's home location?

From Dev

How to create a folder named .ssh in the user’s home directory in ubuntu?

From Dev

How to safely delete a QT::QTcpSocket?

From Dev

How to safely delete a system partition?

From Dev

How to safely delete a QT::QTcpSocket?

From Dev

My home folder ('/home/<user>/ ') is changed to Desktop

From Dev

Lock a user with his home folder

From Dev

cmder ~ alias for user home folder

From Dev

Java - Delete folder and its contents

From Dev

How to give a specific user access only to a specific folder and its contents?

From Dev

How to give a specific user access only to a specific folder and its contents?

From Dev

is it safe to delete ~/home/{User}/.cache/

From Dev

How do I give www-data user to a folder in my home folder?

From Dev

How do I give www-data user to a folder in my home folder?

From Dev

How to delete all the folder except one folder and its content using command prompt?

From Java

Can I safely delete contents of Xcode Derived data folder?

From Dev

Can you safely delete apps from iTunes music folder?

From Dev

What is the runtime-EclipseApplication folder for, and can I delete it safely?

From Dev

What can I safely delete from the "C:\WINDOWS" folder?

Related Related

  1. 1

    How could I safely delete the Desktop folder icon from my Home folder?

  2. 2

    How to safely delete the contents of a folder with a bash script?

  3. 3

    Shortcut to User Home Folder

  4. 4

    delete a folder and its content

  5. 5

    How to safely copy home folder from a 10.04 desktop to a new ubuntu 12.04 installation on a notebook?

  6. 6

    How to safely copy home folder from a 10.04 desktop to a new ubuntu 12.04 installation on a notebook?

  7. 7

    How to rename a user safely?

  8. 8

    How can I remove the home folder for a deleted user on windows 7?

  9. 9

    How to give user access to specific folder in home directory

  10. 10

    Linux - How to give full access to home folder and files to a user?

  11. 11

    how to create a ~/bin folder in all user's home location?

  12. 12

    How to create a folder named .ssh in the user’s home directory in ubuntu?

  13. 13

    How to safely delete a QT::QTcpSocket?

  14. 14

    How to safely delete a system partition?

  15. 15

    How to safely delete a QT::QTcpSocket?

  16. 16

    My home folder ('/home/<user>/ ') is changed to Desktop

  17. 17

    Lock a user with his home folder

  18. 18

    cmder ~ alias for user home folder

  19. 19

    Java - Delete folder and its contents

  20. 20

    How to give a specific user access only to a specific folder and its contents?

  21. 21

    How to give a specific user access only to a specific folder and its contents?

  22. 22

    is it safe to delete ~/home/{User}/.cache/

  23. 23

    How do I give www-data user to a folder in my home folder?

  24. 24

    How do I give www-data user to a folder in my home folder?

  25. 25

    How to delete all the folder except one folder and its content using command prompt?

  26. 26

    Can I safely delete contents of Xcode Derived data folder?

  27. 27

    Can you safely delete apps from iTunes music folder?

  28. 28

    What is the runtime-EclipseApplication folder for, and can I delete it safely?

  29. 29

    What can I safely delete from the "C:\WINDOWS" folder?

HotTag

Archive