23 Jan 2023 06:04 PM
How to change the system user on a specific cluster node?
When this node was deployed a while back, it was deployed with a completely different user than the other two nodes (3-node cluster). First, if I want to change the user, can I just run the reconfigure command with the --system-user-id parameter? I want to change this node from userA to userB, so I am wondering if I can run this command with userB's UID and GID would that accomplish this? If that is the case, do I need to manually update any files (chown command) for the new user, or does the reconfigure command do this automatically?
Solved! Go to Solution.
23 Jan 2023 06:09 PM
1. Stop Dynatrace Managed on a node:
sudo /opt/dynatrace-managed/launcher/dynatrace.sh stop
2. Change uid:gid in the OS
usermod -u 2005 dynatraceuser
groupmod -g 3000 dynatraceuser
more help: https://www.cyberciti.biz/faq/linux-change-user-group-uid-gid-for-all-owned-files/
3. Execute reconfigure with the system-user-id param
/opt/dynatrace-managed/installer/reconfigure.sh --system-user-id <UID:GID>
4. Start dynatrace service:
sudo /opt/dynatrace-managed/launcher/dynatrace.sh start
Are there any risks with permissions for files breaking? Does this mean we also need to execute a recursive chown+chgrp to fix file permissions manually?
No. Reconfigure script will change permissions automatically.
05 Mar 2023 10:52 AM
Thanks for this tip! I'll be having to do this next week in a client installation. I had checked in the documentation, and while it says all nodes should have the same uid:gid pair, it really doesn't say how to change that, if the Managed installation is unable to guarantee that in the first place. I would say that this tip of information should make it to the documentation.
I'll also join some notes that might be important for anyone reading this: