Originally Posted by tronayne
I can just edit /etc/passwd and change dspace to the Tomcat ID and group but that, as I recall, is a Big No-No; it works, but ya just ain't supposed to be doing that.
I've done this occasionally over the years without any negative affects.
You have to remember to change the UID and GID of all files owned by that user.
If there are programs/scripts looking for that specific
UID/GID by number instead of name, then those must also be modified. The best situation is when you know the UID/GID must match in multiple systems and you set up those accounts to match when they are created. Then any autogenerated scripts using that user/group as part of an installation process are correctly created.
If any "permissions" lists use UID/GID instead of the name those would need to be modified. (ACLs?)
On UNIX systems in the past I've changed the name
of UID "zero" from root
to something innocuous in an attempt to increase security on multi-user systems. (security through obscurity) I always had to change it back to root
however because many (most?) programs/scripts use the name (root) and not the UID (0) when installing software updates and such (a bad choice IMHO).
There may be something different in Linux from UNIX that I'm not considering.
EDIT: I recommend changing the UID/GID of a single user rather than having two or more user names with the same UID/GID. Although both methods will probably work for your purposes, other complications can arise when user names
need to match.