SUSE Conversations


How to keep consistent user data across multiple installations of Linux on the same machine



By: Pim Dennendal

February 2, 2006 12:00 am

Reads:225

Comments:0

Score:Unrated

Print/PDF

Applies to:

  • SUSE Linux 10.0
  • SUSE Linux Professional 9.2-9.3
  • Novell Linux Desktop 9
  • SUSE Linux Enterprise Server 9

PROBLEM: Multi-boot with different versions Linux mucks up the hidden file (.bashrc, etc,) and gives problems with choosing the right kernel/initrd.

SOLUTION: By its very nature this is really two seperate questions. Only the first is addressed here AND only in part.
The original article suggested the use of (soft) links (ln -s <file-path> <my-link-name>). The problem was being addressed backwards and that was the rub.

The real problem is “How can I get hold of my data from every system?”. The answer is very simple.

Make a second directory in /home such as /home/local. This is either used directly or as a mount point for the real “home” partition. For the paranoid, this may be .local – the DOT makes it hidden causing a very confusing // where you would expect a /.

Move all important AND user-visable directories from /home/<user-name> to /home/local/<user-name> maintaining all ownership (not root:root) and permissions (u-mask). Mostly, this ./bin ./Documents and ./public_html.

Make appropriate soft links (ln ../local/<user-name>/Documents Documents) for everything you moved. This makes them visible to the user under /home.

Unless you feel incredibly adventurous, DO NOT move the hidden files and directories. ,But, if you really are and just cannot help yourself, make a /home/local/<user-name>/etc/ as a catchall, move it there and then do you ln -s -bit.

Other things you can do:

Firstly secure /home so that your wonderfull and incredibly saintly users do not go and muck-up all this hard work – Well this ancient newbie is his very own hacker and in-house, too.

Secondly – and hopefully some bright spark will tell me how – Adjust /etc/skeleton so it all gets done automatically – Saves all the finger trouble.

For multi-booting with GRUB, please see my comments on my previous article.

EXAMPLE:

 # /bin/bash  --- running as root
# Make your real home-dir
mkdir /home/local
# make user home-dir
mkdir /home/local/pluto
chown  pluto:users ../local/pluto
# Go to original and move user-stuff
cd /home/pluto
mv bin ../local/pluto/bin
chown  pluto:users ../local/pluto/bin
ln ../local/pluto/bin bin
mv Documents ../local/pluto/Documents
chown  pluto:users ../local/pluto/Documents
ln ../local/pluto/Documents Documents
mv public_html ../local/pluto/public_html
chown  pluto:users ../local/pluto/public_html
chmod 0755 ../local/pluto/public_html
ln ../local/pluto/public_html public_html
# We are done for user named pluto aka doggie-features.
0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Categories: Uncategorized

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

Comment

RSS