Re: Change uid and group id - Oracle User
Posted by ErmanArslansOracleBlog on Jan 27, 2017; 7:36am
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/Change-uid-and-group-id-Oracle-User-tp2018p2019.html
Hi,
You can change it using usermod and groupmod.
İ.e:
usermod -u 2005 oracle
groupmod -g 3005 dba
However, this may cause problems.
You also need to update the files that is owned by your OS user (i.e oracle) with the new uid and group id.
For example: if you change the uid from 506 to 9933
Then you need to change the userid stored in files owned by the user as well.
A command like the one below, can do this job.
find / -uid 506 -exec chown -h 9933 {} \;
Same for changing the groupid.
find / -gid ${OLD_GID} -exec chgrp -h ${NEW_GID} {} \;
For example:
find / -gid $11140 -exec chgrp -h 3001 {} \;
Note that: The chgrp and chown removes the setuid bit on some files.. oracle binary for example has setuid on it. So the setuid bit on these kinds of files should be reset with chmod.
chmod 6751 oracle
For Exadata Storage Servers, it is documented actually:
How to Change the Group ID (GID) and User ID (UID) of the New DBM Services Users and Groups in Exadata. (Doc ID 2006042.1)
But For Oracle RDBMS and EBS, it is not documented at all.
So you need to test it. First do your test and then take it into Live by taking the risk on your own.
You can also create an SR for this.