I have presently all my process running by user1 id on my server . Now we have a new user user2 and we want all the process running by user1 to run by user2. This is done for consistency as all other host uses user2 What should be the things that i should follow and must do things ? Note that user1 and user2 both have root privileges.
Asked
Active
Viewed 154 times
0
RMG
- 103
1 Answers
0
It's not clear if the processes can be restarted as the new user or not. Assuming the processes can be stopped and restarted, and that user1 will actually become superfluous after the change, then it's relatively straight-forward:
- backup (!)
- stop all the user1 processes
- create user2
- (optionally) move/copy all the user1 files, just to be clear that they now belong to user2 (as necessary)
chownall the files from user1 to be user2 (as necessary)- be sure no script explicitly refers to
user1by name (orid), or references~user1home directory. Make these scripts generic by using$LOGNAMEor$HOMEinstead of the user name.
If any of the processes assume that the user has a specific id, then that is something to watch for (but unlikely to be the case). After, it's likely the case that user1 can be disabled/deleted.
michael
- 1,161