LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is the user root home directory needed in linux (https://www.linuxquestions.org/questions/linux-newbie-8/is-the-user-root-home-directory-needed-in-linux-4175558272/)

LinuxPirate 11-07-2015 03:32 PM

Is the user root home directory needed in linux
 
Since BSDs don't have a root user home directory, can I safely delete the root home directory in a linux system and will it affect the system? thx

Emerson 11-07-2015 03:36 PM

Nothing in /root is required to run the system. It is used for root logins, though.

LinuxPirate 11-07-2015 04:22 PM

Instead of deleting the /root directory, I did remove the root home directory from the /etc/passwd file.

I went from this
Quote:

root:x:0:0:root:/root:/bin/bash
to

Quote:

root:x:0:0:root::/bin/bash
I rebooted The system and it did boot fine. But when I logged in as root, there a few error messages coming up. Mostly failed to read errors, etc.

So I reverted back to my original /etc/passwd file and rebooted. Everything is back to normal again.

"But hey, that's what linux is for. tweaking and testing" But do it in a VM and not on your main system :)

astrogeek 11-07-2015 04:36 PM

Quote:

Originally Posted by LinuxPirate (Post 5446151)
Since BSDs don't have a root user home directory, can I safely delete the root home directory in a linux system and will it affect the system? thx

Why would you say BSDs do not have a root user home directory - they certainly do!

Why would you think it is, or is not, "safe" to remove it? Define "safe" in that context.

Do you have any actual reason for wanting to remove the root home directory, or are you mimicking a monkey pushing random buttons?

Quote:

Originally Posted by LinuxPirate (Post 5446172)
"But hey, that's what linux is for. tweaking and testing"...

No, Linux is for using your computing hardware and your knowledge in tandem to perform some useful tasks. You may also tweak and and test and abuse and break it, but that is not what it is for.

Can you drive your car with loose lug nuts? Yes, for a while... but that is not what the car is for.

Can your 5 year old drive your car on the freeway? Again, yes, for some indeterminate distance...

LinuxPirate 11-07-2015 04:52 PM

I did read that linux is a hobbyist operating system?

astrogeek 11-07-2015 04:56 PM

I'd say you read wrong, or incompletely, or you have been reading Bill Gates twisted memoirs. ;)

You might want to do a little more reading for a better understanding.

jpollard 11-07-2015 05:54 PM

Quote:

Originally Posted by LinuxPirate (Post 5446151)
Since BSDs don't have a root user home directory, can I safely delete the root home directory in a linux system and will it affect the system? thx

Actually, I believe they do have a root directory... it is usually called "/".

The "/root" directory came about for the purpose of reducing (slightly) the chance of really bad mistakes.

It also gives the root login a place to save site local root scripts (cron jobs for instance) and someplace to keep notes about the system.

Soadyheid 11-07-2015 07:01 PM

Quote:

I did read that linux is a hobbyist operating system?
Oooooh! Have you heard of a company called Google? Guess what operating system they use to run most of their stuff on. Just about every company you can think of uses Linux to some extent on a high proportion of their servers.
I don't think this would happen if Linux was just a "hobbyist" Operating System.

All this of course doesn't mean that a hobbyist can't install a version of Linux and take it to bits to see what makes it tick.

OK, I'm OK, the hackles are going back down now. Maybe if I go and stand in a darkened room for a while... ;)

Play Bonny!

:hattip:

frankbell 11-07-2015 08:39 PM

Quote:

I did read that linux is a hobbyist operating system?
Are you saying that Google, for one, is just a hobbyist? Here's a list of a few other hobbyists.

Under the GPL, you are free to tweak and even break your personal Linux install any way you want, but to call Linux a "hobbyist" OS is not quite accurate.

Randicus Draco Albus 11-07-2015 09:29 PM

The important question is, why do you want to remove that directory? astrogeek asked that question, but you did not answer it. I, for one, am curious to know the answer.


All times are GMT -5. The time now is 05:07 PM.