2011. november 22. 13:33 napon David Haller
Hello,
On Mon, 21 Nov 2011, James Knott wrote:
Istvan Gabor wrote:
No, since once (very long time ago) I read somewhere that it is not a good idea to change the UID of an existing user in linux/unix. But it might have changed since then. Is it safe to change user ID in a modern linux system?
According to the Help for that page, changing the UID will also update the files in the home directory, but not elsewhere. However, on an new system, a user is not likely to have files elsewhere. Even if they did, it's a simple matter to use find to find a users file and change the uid.
I.o.w: you could just change the uid in /etc/passwd and run a
find / -uid {OLD_UID} -exec chown {NEW_UID} {} +
which may take quite a while depending on how large the fs is.
To create a fake user looks easier for me. But the command still can be useful in other circumstances.
Or you could tar up the fs (that users stuff) not using "--numeric-owner", change the uid in /etc/passwd and untar again without "--numeric-owner". Or similar stuff in that vein.
I'd recommend setting the desired UID on creation though. And you can change that during install. At least you could on 11.2 (last I did a "install" with ;)
How? As I remember correctly I could not set it when I installed my 11.2 which I am still using. I installed 11.2 on several machines but can't remember an option that made it possible. Could you please give me a hint? Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org