[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /root -> /home/kmfahey; /usr/doc -> /usr/share/doc



On 11/12/99 Kerne Fahey wrote:


1) On my linux box (no other flesh&blood users besides me; it's a laptop),
I'm interested in emptying root's home directory, removing it, and making
a symbolic link to my home directory, /home/kmfahey . This is for various
aesthetic and convenience reasons, mostly so I'm not without my .*rc files
when root, and so that 'cd' as root takes me to my home directory. Would this
be a horrible mistake? (Would it be or create a security hole, or *really*
confuse linux in some way?)

this depends on whether or not /home is on the same partition as / if so then the main reason for /root being there does not matter. that reason is so root's home directory is available if the system goes down to single user mode where filesystems other then / may not be available, or if filesystems other the / are damaged, destroyed or full. if a filesystem is full you may not be able to login, but root could since its probably /home that is full rather then / (/home should always be a separate partition from /)

as for security there is some extra risk in doing this, since all anyone/anything would have to do is add some nefarious code to one of your .*rc files that would be run as root next time you used su or logged in as root. it could even check the uid and not run if its not 0 so you would not notice it till its too late.

personally I would not do it, for the security reasons and because my /home is a different partition from / and for that reason /root is on / you would be better off doing this as root:

# cp ~yourusername/.[!.]*rc /root

then you get your *rc files without the extra security risk and without removing the advantages of having root's home in the root filesystem

(you could also use usermod -d /home/yourusername root to just change root's home directory and not bother with the symlink but i still think this is a bad idea)

2) On that same linux box, I'm interested in [carefully] moving the contents
of /usr/doc to /usr/share/doc , then removing /usr/doc and creating a symlink
in its place to /usr/share/doc . This, also, is for various aesthetic and
convenience reasons, mostly because of the FHS, and because I'd really like
dhelp_parse to shut up about files in /usr/doc every time I'm apt-getting
something. Would .this. be a horrible mistake?

this would be a very bad mistake for several reasons:

1) dpkg is slightly broken in regards to symlinks, this is the reason debian policy for potato states that packages move to /usr/share/doc and place a symlink in /usr/doc/packagename for backword compatibility, there was much flamewar on the -devel lists about how to do this and the reason the above was done is because dpkg does the wrong thing with /usr/doc is a symlink.

2) your packages will not upgrade properly having there files moved, the symlink won't help because of the above problem.

3) its best to not tinker with locations of package owned files.

if you want more reasons just do a search on -devel for "/usr/doc -> /usr/share/doc transition" you should only get about 10 million results :-)


--
Ethan Benson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OpenPGP encrypted mail accepted.
To obtain my PGP key: http://www.alaska.net/~erbenson/pgp/
Key FingerPrint: 371A 7416 5D39 CF2D 9366  8AF6 0139 54F5 3EBD 0FE6
RSA Key FingerPrint: DE8B 74D0 79F1 6176  9AF5 120F 47AD 9B0A
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Reply to: