"Stanislav Malyshev a.k.a Frodo" wrote:
>
> M>> Can i change the USER_ID in the passwd file to something bigger then the
> M>> last user_id ?
>
> You can. But it going to do different thing that you possibly mean: if you
> change uid field for "user" in passwd file, you just give name "user" to
> other uid. Old uid doesn't vanish, all files owned by it remain, etc. Just
> logging in under "user" will give different uid from now.
>
> M>> Will it damage my system ?
>
> Depends on what you mean "damage". For your system it won't be any bad -
> it doesn't really care what is written in /etc/passwd, everything is uids
> inside, not usernames. So really no much changes for it. Just don't use
> uids more than 65534 - it may hurt.
>
> But as described above, if you do this to change your friend's uid, you
> may not get what you want, and your friend will lose access to all his files.
>
Of course, if you know this is going to happen you can do something
like:
find / -uid (old uid) -exec chown (new uid) {} \;
This may take awhile, as it will go through the whole file system
searching
for files that are owned by (old uid) and change them to being owned by
(new uid). If you know that your users files are only in a specific
place (like their home directory) then you can save time by doing:
chown (newuid) (home dir)
cd (home dir)
find . -uid (old uid) -exec chown (new uid) {} \;
..james
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]