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

Changing UID's?



I'm 'cr', UID 1000 in my Debian setup.    However, under RedHat I was 
UID 500 and all my heaps of data (left over from RedHat) is filed as  owner 
500  group 500.     This means I can't readily access it without changing 
something.

I could, of course,  chown  the whole lot to   cr:cr   (i.e.  1000:1000  in 
this Debian system) but that means if I ever crash this installation and have 
to put my RedHat disk back I'll have to change it all back again, so I'm a 
little reluctant to do that  (and also, I'm nervous about changing ownerships 
on entire directory trees....)

For now, I've given myself access by adding a line in /etc/group   
cr1::500:cr
which as I understand it makes Debian think all the files with UID/GID of   
500:500  belong to a group 'cr1' and I, 'cr', am a member of that group.   
(It doesn't work on any files copied from the old RH /home/cr/ which have 
'owner' permissions only, unless I su root or change permissions, but those 
are just backups so I can live with that).

However, it would be more sensible I think if I was User 500  in both 
systems.   Is there any safe legal way to change my UID from 1000 to 500?
Or, failing that, can I do it by using 'adduser' to create a new user, say 
'cr2', as user 500, then when I've got 'cr2' properly set up and everything 
works, delete user 'cr' (with UID 1000) and rename user 'cr2' to 'cr'.   

And, more importantly, are there any hidden snags in any of the above which 
will crash my whole system or lock me out of it?

Regards

cr
... slowly getting this sytem into shape...



Reply to: