LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /root is missing? (https://www.linuxquestions.org/questions/linux-newbie-8/root-is-missing-686682/)

samohn 11-27-2008 01:16 PM

/root is missing?
 
I thought root home directory is /root, but it does not exist. Actually I thought I have seen it in previous installations of Fedora core 9.
Am I wrong? Or, there may be something wrong with the installation..?

Xian 11-27-2008 01:26 PM

$ ls /

Do you see 'root' listed?

newtovanilla 11-27-2008 03:28 PM

You have to have /root! Did your Penguin leave you for the snow?

gilead 11-27-2008 04:54 PM

Have you looked in /etc/passwd to see what it is set to?

zetabill 11-27-2008 05:28 PM

If you're trying to get there while not logged in as root, SELinux may be preventing the normal user (you) from seeing it.

samohn 11-27-2008 05:40 PM

Quote:

Originally Posted by Xian (Post 3356979)
$ ls /

Do you see 'root' listed?

Now no. But, I am sure it was under /.

Quakeboy02 11-27-2008 05:55 PM

Taking a different direction on your post:

What were you doing that caused you to notice that it was missing? Were you logged in as root and moving files in /somethingorother or in /root? If so, chances are you've moved /root somewhere else or perhaps deleted it.

samohn 11-27-2008 06:05 PM

Quote:

Originally Posted by newtovanilla (Post 3357076)
You have to have /root! Did your Penguin leave you for the snow?

I know. I am newbie but actually have used Linux a lot since early 90s but not for about 10 years. So, I thought /root should exist and it was there until last night.

I log on to the Fedora server as a user but not a root. I frequently use su command. This morning I felt strange when I used it because the prompt was not the same as before. On command line prompt used to show (I believe) current folder name, but all the suddenly it showed just bash-3.2#. Also, I found that cd ~ did not work.
Then, I tried to check the /root, but I could not find!
... I have just reinstalled Fedora core 9 4,5 days before because samba has never worked with the previous installation. Maybe, I am a little confused???

salter 11-27-2008 10:21 PM

You seem to have deleted or moved the /root directory, obviously unintentionally, maybe during your re-installation. Otherwise Fedora should have the /root directory just below / and this is certainly not something that RedHat and the Fedora people are about to change.

You need to figure what has gone wrong during re-install.

your_shadow03 11-27-2008 11:06 PM

Post your /etc/passwd file.

ozminh 11-28-2008 01:24 AM

juz simply creat a new one

newtovanilla 11-28-2008 12:21 PM

Quote:

juz simply creat a new one
and leave the old Penguin out in the cold? I think you should find the old root, where did it go?

colucix 11-28-2008 12:29 PM

Code:

find / -type d -name root

samohn 12-01-2008 09:58 AM

Quote:

Originally Posted by zetabill (Post 3357154)
If you're trying to get there while not logged in as root, SELinux may be preventing the normal user (you) from seeing it.

I think that was it. I logged on the system as root and could see /root directory. I usually log on to the system as a user and frequently use su to make system level changes.

Thank you for your help. I have spent a few weeks for the samba which has never worked and I was so frustrated. Now that I can go back to work on the samba issue at least... I hope I can make it work this week.

Thank you again!

samohn 12-01-2008 10:29 AM

Thank you very much for the everybody who posted threads here. I have gotten a right answer from Zettabill. I was missing /root because SELinux hid /root directory when a user logged on SELinux system, but I did not know SELinux could hide /root directory.

What happened was that when I used su, the prompt sign changed to basic shell prompt instead of the one with current directory name. I thought the prompt sign did not change when I switched between root and a user. Then, I started searching for the root shell script in /root and could not find the root directory.

I think I probably saw /root when I logged on the system as root and thought it was always there even when I logged on as a user. But, I still do not know why I was not aware of that the prompt sign changed. Maybe it was just my confusion, I guess. I have used earlier version of Linux since 90s but have not used Linux for about 8 years and am not very familiar with SELinux. I probably should learn more SELinux or stop using it if it's not very necessary.

Samoh


All times are GMT -5. The time now is 10:00 AM.