Hi Ross,

On Wednesday 25 April 2007 writes Ross Boylan:
> Does anyone know of a tool/script that will remap one set of uid's and
> gid's to another?  I.e., if sarah has id 1005 on the original system,
> and I restore it to a system where sarah has id 1004, can I get
> something that will rewrite the id's on the new system to 1004.
>
> Since I've had some luck with my restores, I'm on to more advanced
> problems.  I can probably do reasonably well by applying chown
> recursively to a few high-level spots, but it would be nice if there
> were something more precise.
>
> Although this issue arose while using bacula, it's a general issue.
> Of course, it would be nice if bacula had some rewriting facility for
> uid/gid hooked into it.
>
> This is on Linux with a naive single-system approach to uid/gid.  I
> think centralized schemes would pose more challenges, and I know
> modern versions of windows use UUID's for identity, with sometimes
> surprising results (e.g., if you delete the account for user joe, and
> then recreate an account for user joe, the system doesn't think
> they're the same user).

You can use find for your opinion:

find /path/to/your/restore/ -uid 1021 -exec chown newuser.newgroup {} \;

set both, the new uid and the gid

or

find /path/to/your/restore/ -gid 1022 -exec chgrp newgroup {} \;

set only the new gid

... or whatever witht find ... -print0 xargs .... This is not a native restore 
problem, i mean this is only a admin job for the local operator. 

regards
   Falk


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to