home directory specs
Hi. Is there anything special about a home directory before users' home directories are stored there, or is just as typical as any other "empty" folder?
Let me just cut to the chase, but please no ear ringing about the folly of messing around as root, particularly with directories at root level. I know it's considered stupidity, but I deleted my home directory. Is there an easy way to restore a working home directory? I tried copying /etc/skel under root, but I'm not sure what a home directory should look like once it has been restored. Besides . & .., there were .screenrc & .xsession in my home directory when I copied /etc/skel. Are these files suppose to be in "/home" or "/home/~" or both? |
First, /home contains all of the user's directories... as in there is a folder for each user corresponding with their username in /home. So my /home is really "/home/keithieopia" You shouldn't really need to copy anything from "/etc/skel" most Linux applications will create whatever file they need automatically in your home directory... but better safe that sorry.
So if your deleted your /home/USERNAME type the following commands as root to fix it (replace USERNAME with your actual username): Quote:
So with your two files (most likely not needed) it would look like: /home/USERNAME/.screenrc /home/USERNAME/.xsession |
Actually, I didn't delete a user's directory in /home. I deleted /home. Can I just "mkdir /home" to restore it? Or was /home "special"?
|
Erm... if you deleted "/home" then everything under "/home" such as "/home/keithieopia" is also deleted. Did you do one of these: "rm -r"? If so, that's the case. You'll need to just "mkdir /home" before the rest of my instructions:
Quote:
|
Okay, now with an empty home directory, can I mount an ext3 or ext4 partition to /home and still use /home for users' home directories?
|
It should be doable by messing around with you /etc/fstab file. Theoretically, in Linux, you can mount any drive partition to any empty folder. It all depends on exactly what you want to do with this, and the permissions you assign to both the folder you created and the partition to be mounted. Look up the 'mount' command (man -k mount or info mount) Hope you get your system back up and running!
|
Quote:
|
What should be in /etc/skel/ ?
Mine is empty :( |
|
jv2112, it looks empty because some of the files are hidden. If you run "ls -a /etc/skel" or "ls -al /etc/skel" the -a option shows your hidden files.
|
Thanks
|
All times are GMT -5. The time now is 08:49 PM. |