Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
87
rated 0 times [  87] [ 0]  / answers: 1 / hits: 203473  / 3 Years ago, sat, june 19, 2021, 10:36:00

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?



More From » 14.04

 Answers
2

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

[#25493] Saturday, June 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ibuteking

Total Points: 35
Total Questions: 128
Total Answers: 138

Location: Indonesia
Member since Thu, Oct 1, 2020
4 Years ago
ibuteking questions
Sat, Sep 10, 22, 08:44, 2 Years ago
Fri, May 12, 23, 10:10, 1 Year ago
Tue, May 23, 23, 13:38, 1 Year ago
;