Can root and my main user account share the same home directory?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
im not acualy sure but i belive it would be a security risk if both root and user had the same home directory. its like lets say your user pass was compromised the hacker would then have acess to the folder thats both root home and user home and all files/directories associated which is a reason why root is seperated.but why do u want them to be the same? root can acessed all directoies on the computer any ways. so if you made a user account and needed acess with root you could acess the user directory. you just couldnt acess root home dir with the user tho.
For an unprivileged user to be able to write to /root or any other user home would require that directory and files to be readable and writable by both users. Now "root" by design is not an account to ever be used for day to day tasks as it holds the keys to the castle (owns user auth, starts daemons, owns files no other users should have write access to) and it is the most "trusted" account on your machine. So as unprivileged user fscking up root (say writing to a file root then reads) could potentially lead to Interesting Things.
Originally Posted by rivercat
I've been using root only
Whatever reason you think you had for doing that it's not valid.
That just is not the way to do things.
Originally Posted by rivercat
It's the dotfiles for GUI apps that I'm concerned about
Copy them to some other directory, replace "root" with the unprivileged users account name in the files, then copy them to the unprivileged users directory and chmod and chown them. If that doesn't work for some files (binary contents) and results in trouble then just remember you caused this yourself.
I was thinking more like adding root and the main user to the same group (users?, NOT wheel or adm).
Then making the /home dot files & subdirectories owned by this group.
Files for root only can stay securely in /root.
Why don't you just copy or move all the dot-files and dirs, and chown them to the
Because then every configuration change in one account has to be repeated in the other account.
My text editor (leafpad), file manager (tuxcmd), and firefox only use per-user config files, not system-wide ones.
Sorry to be so long in getting back . . . damn clients and their deadlines!
>>Good idea Clachair, but even if root owned the symlink,
>>can root write to the target directory's files, which are owned by the user?
Yes, root can write in/to any directory files. In fact, I use a root chron job to read/write into a user's directory via a symlink every night. This stops the user from messing with the chron jobs, since the symlink doesn't show up in his directory list.
Last edited by Clachair; 02-21-2011 at 08:23 PM.