I could try that but if it would work this is a hack, I'd prefer more conventional method with a command, such as restarting a service or running a command etc.
editing files to get expected result is at best a workaround.
That's an interesting point of view. There are others

.
Linux uses text files for configurations. One reason for that is to make them accessible to the user, especially because configurations can be altered in many ways, in some cases in undocumented ways. So, as a general rule, they are available for user alteration. Some are inadvisedly alterable and come with messages to that effect. In that case one is best to know just what they are doing if they choose to make alterations. Other config files are not so, and specifically not so as is indicated by the numerous commented lines which are alterable in them. There are many examples.
In the case of some configuration utilities, they alter more than a single file, and can be more involved. For example, adding a new user through the adduser or useradd command may add a new directory and then add a bunch of dotfiles such as those from /etc/skel. In that case, using a relevant command can be useful. It's not however, necessary, but rather, convenient. On the other hand, if the user wishes to make a single alteration to a configuration file, like adding a user to a group, the option of doing that is available without any negative consequences or repercussions for the system, rather, a benefit for the user.
If the the term "hack" has a perjorative sense for some, there are other interpreted senses that are far more positive and with perhaps less influence in restricting a user's behaviour in their use of the system. To be entirely dependent on one version of how things can be achieved to the exclusion of effective alternatives seems to me to be needlessly self-confining if that is happening.
In any case, on the idea of a "hack", linux distros can be considered as full-on hacking distributions. That said, it's hard for me to consider the addition of a single configuration such as adding a username in /etc/group as a hack, but YMMV. I guess it's worth noting that for many configuration options, no command exists and it's direct alteration of the configuration files that is going to achieve an intended end.
In this case where the relevant commands appear to be failing, there appears to be an underlying problem for which troubleshooting could be gone into. To resolve the immediate problem however, the option of direct alteration to the configuration file is available. I wish I could see what the problem is, but I can't at the moment because I'm not familiar with it.