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

Re: Equivalencing usernames/ids across computers



On 10/14/2011 04:34 AM, Tony van der Hoff wrote:
I have a VPS, a laptop and a home server, with various users/ids on
each, but with a degree of overlap. So, for example, on the VPS I have
userA id 1001, userB id 1002, and userC id 1003, etc. On the laptop I
have userA id 1001 and userC id 1002. On the home server, I have userA
id 1002, userB id 1001, and userC id 1003. You get the picture.
This matters not, until I back up the laptop and desktop onto the VPS,
at which stage confusion starts to arise. Backing up from the laptop to
the desktop aggrevates the situation.
Of course I should have designed things better, and assigned the same
user names and Ds to each; but things just grew.
So, apart from reallocating user names/numbers at this late stage, what
dou you recommend using to map across the various systems without my
having to think too hard about it?

On 10/14/2011 08:45 AM, Walter Hurry wrote:
> How many users? The reason I'm asking is because my gut feeling is
> that the best plan might be to bite the bullet once and for all, and
> change UIDs to achieve true user equivalence.

On 10/14/2011 09:00 AM, Tony van der Hoff wrote:
> Only about half-a-dozen, so I guess you're right, but my concern is
> that it might be error-prone, and I might end up corrupting things.
> Then there's the problem with keeping it all in sync when new users
> are added.

I once had a similar mess on my home LAN with a half-dozen machines and a half-dozen accounts. I now use identical usernames, UID's, and GID's on all machines. I recommend that you decide on your name/ numbers policy and roll it out one machine at a time, as part of a full backup/ fresh install/ restore process.


For backups, I use GNU tar, gzip, and rsync, automated with Bash and Perl scripts. I restore as root to a temporary directory and manually relocate pieces using mv, chown, chgrp, chmod, etc.. If you have spare hard drive(s), you can wipe/ fresh install/ restore to a spare, mount the old drive (read only) off to the side, and then use diff and cmp to double-check things as you go.


If you're using backup/ restore to migrate/ sync data, consider using a client-server or distributed version control system instead (such as CVS, Git, Mercurial, etc.).


HTH,

David


Reply to: