Changed /root folder name
-
After Linux was installed on my home computer, when looking through the file system, I located the /root directory. I found the name ‘root’ a bit boring, so I changed the name of the directory to ‘Harry’s docs’. Now whenever I log onto Linux a message appears saying: ‘Your home directory is listed as: /root but does not appear to exist’. The computer is running a dual-boot setup with Windows XP and RedHat Linux.
The /root folder is the ‘root’ users home directory. The name of this directory corresponds to the root user name, so that Linux can map the user to this directory. As you can see, by changing the name of this home directory Linux can no longer find the root users home directory, and is giving you the error message. I assume that you cannot log into Linux using the usual method at the moment, due to this error message. One possible way to fix this problem is to login to Linux under another username and then change the directory name back to /root. This is unlikely to work since other users would not have permission to change or alter the /root (now known as /Harry’s docs) directory. However, you will be glad to hear there is a solution to your issue, which I was able to test since I have Linux loaded on my home computer. This involves renaming the root home directory back to /root using the Linux console. Start Linux so you are at the logon screen. We need to kill the graphical interface (called X11) and bring up the text-based console. Press CTRL-ALT-BACKSPACE to kill the X server and make the console appear. You should see the screen go black and (possibly) the console logon screen appear. However, you may find that the screen goes black and the graphical interface re-appears, or the console logon appears and then the graphical interface re-appears. This happens because X11 reloads. In this case, press CTRL-ALT-BACKSPACE again. The same thing may happen. If it does, keep pressing CTRL-ALT-BACKSPACE until a message appears saying the graphical interface failed in a short period of time, so it will no longer be loaded (on my system, I needed to kill the X server 5 times for this message to appear). Once this message appears, press ENTER to accept the message. The console should now stay visible. Login at the prompt your root username and password. Because you do not have a home directory associated with the root user, a message will alert you to this matter and the default bash terminal will load at the directory /. At the prompt, type the following command:
mv ‘/Harry’s docs’ /root
This is the move command and will rename the source (first argument - /Harry’s docs) to the destination (second argument - /root). It is very important the words ‘Harry’s docs’ are in inverted commas, as there is a space in the directory name. Once you have typed this command, press ENTER. The command should execute with no messages. You can then type:
cd /root
to go to the /root directory. To view the contents of this directory, type the command ‘ls’. Once you are finished, press CTRL-ALT-DEL to restart the computer. Boot back into Linux (the graphical interface should appear) and login to the root account.While we are on the subject, it is not a good idea to use Linux on a daily basis under the root account. This user has complete control over the system, which makes it possible to accidentally change vital system components during normal daily operations. I strongly suggest you create a user account (e.g. harry) for daily use, and only use the root account when you need to do system maintenance, or other tasks requiring root access.